org.liquidsite.core.web
Interface Request.FileParameter

Enclosing interface:
Request

public static interface Request.FileParameter

A request file parameter.


Method Summary
 java.lang.String getName()
          Returns the base file name including the extension.
 java.lang.String getPath()
          Returns the full file name including path and extension.
 long getSize()
          Returns the file size.
 java.io.File write()
          Writes this file to a temporary file in the upload directory.
 void write(java.io.File dest)
          Writes this file to the specified destination file.
 

Method Detail

getName

public java.lang.String getName()
Returns the base file name including the extension. The file name returned is guaranteed to not contain any file path or directory name.

Returns:
the base file name (with extension)

getPath

public java.lang.String getPath()
Returns the full file name including path and extension. The file name returned should be exactly the one sent by the browser.

Returns:
the full file path

getSize

public long getSize()
Returns the file size.

Returns:
the file size

write

public java.io.File write()
                   throws java.io.IOException
Writes this file to a temporary file in the upload directory. After calling this method, no other methods in this interfaced should be called.

Returns:
the file created
Throws:
java.io.IOException - if the file parameter couldn't be written

write

public void write(java.io.File dest)
           throws java.io.IOException
Writes this file to the specified destination file. After calling this method, no other methods in this interface should be called.

Parameters:
dest - the destination file
Throws:
java.io.IOException - if the file parameter couldn't be written to the specified file