KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > oreilly > servlet > multipart > FileRenamePolicy


1 // Copyright (C) 2002 by Jason Hunter <jhunter_AT_acm_DOT_org>.
2
// All rights reserved. Use of this class is limited.
3
// Please see the LICENSE for more information.
4

5 package com.oreilly.servlet.multipart;
6
7 import java.io.*;
8
9 /**
10  * An interface to provide a pluggable file renaming policy, particularly
11  * useful to handle naming conflicts with an existing file.
12  *
13  * @author Jason Hunter
14  * @version 1.0, 2002/04/30, initial revision, thanks to Changshin Lee for
15  * the basic idea
16  */

17 public interface FileRenamePolicy {
18   
19   /**
20    * Returns a File object holding a new name for the specified file.
21    *
22    * @see FilePart#writeTo(File fileOrDirectory)
23    */

24   public File rename(File f);
25
26 }
27
Popular Tags