001// Copyright (C) 2002 by Jason Hunter <jhunter_AT_acm_DOT_org>. 002// All rights reserved. Use of this class is limited. 003// Please see the LICENSE for more information. 004 005package com.oreilly.servlet.multipart; 006 007import java.io.*; 008 009/** 010 * An interface to provide a pluggable file renaming policy, particularly 011 * useful to handle naming conflicts with an existing file. 012 * 013 * @author Jason Hunter 014 * @version 1.0, 2002/04/30, initial revision, thanks to Changshin Lee for 015 * the basic idea 016 */ 017public interface FileRenamePolicy { 018 019 /** 020 * Returns a File object holding a new name for the specified file. 021 * 022 * @see FilePart#writeTo(File fileOrDirectory) 023 */ 024 public File rename(File f); 025 026}