wicket.markup.html.form.upload
Class FileUpload

java.lang.Object
  extended bywicket.markup.html.form.upload.FileUpload
All Implemented Interfaces:
java.io.Serializable

public class FileUpload
extends java.lang.Object
implements java.io.Serializable

Model for file uploads.

Author:
Jonathan Locke
See Also:
Serialized Form

Method Summary
 byte[] getBytes()
           
 java.lang.String getContentType()
           
 java.io.File getFile()
           
 java.io.InputStream getInputStream()
           
 long getSize()
           
 void writeTo(java.io.File file)
          Saves this file upload to a given file on the server side.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBytes

public byte[] getBytes()
Returns:
Uploaded file as an array of bytes

getContentType

public java.lang.String getContentType()
Returns:
Content type for upload

getFile

public java.io.File getFile()
Returns:
File object for client-side file that was uploaded.

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns:
Input stream with file contents.
Throws:
java.io.IOException

getSize

public long getSize()
Returns:
The upload's size

writeTo

public void writeTo(java.io.File file)
             throws java.io.IOException
Saves this file upload to a given file on the server side.

Parameters:
file - The file
Throws:
java.io.IOException


Copyright © 2004-2005 Wicket developers. All Rights Reserved.