org.apache.myfaces.custom.fileupload
Class UploadedFileDefaultMemoryImpl

java.lang.Object
  extended by org.apache.myfaces.custom.fileupload.UploadedFileDefaultImplBase
      extended by org.apache.myfaces.custom.fileupload.UploadedFileDefaultMemoryImpl
All Implemented Interfaces:
Serializable, UploadedFile

public class UploadedFileDefaultMemoryImpl
extends UploadedFileDefaultImplBase

Version:
$Revision: 782291 $ $Date: 2009-06-06 13:03:52 -0500 (Sat, 06 Jun 2009) $
Author:
Sylvain Vieujot (latest modification by $Author: lu4242 $)
See Also:
Serialized Form

Constructor Summary
UploadedFileDefaultMemoryImpl(org.apache.commons.fileupload.FileItem fileItem)
           
 
Method Summary
 byte[] getBytes()
          Answer the uploaded file contents.
 InputStream getInputStream()
          Answer the uploaded file contents input stream
 long getSize()
          Answer the size of this file.
 StorageStrategy getStorageStrategy()
          Allows to get more information/interact more with the file, depending on where it is stored
 
Methods inherited from class org.apache.myfaces.custom.fileupload.UploadedFileDefaultImplBase
getContentType, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadedFileDefaultMemoryImpl

public UploadedFileDefaultMemoryImpl(org.apache.commons.fileupload.FileItem fileItem)
                              throws IOException
Throws:
IOException
Method Detail

getBytes

public byte[] getBytes()
Answer the uploaded file contents.

Specified by:
getBytes in interface UploadedFile
Specified by:
getBytes in class UploadedFileDefaultImplBase
Returns:
file contents

getInputStream

public InputStream getInputStream()
                           throws IOException
Answer the uploaded file contents input stream

Specified by:
getInputStream in interface UploadedFile
Specified by:
getInputStream in class UploadedFileDefaultImplBase
Returns:
InputStream
Throws:
IOException

getSize

public long getSize()
Answer the size of this file.

Specified by:
getSize in interface UploadedFile
Specified by:
getSize in class UploadedFileDefaultImplBase
Returns:
long

getStorageStrategy

public StorageStrategy getStorageStrategy()
Description copied from interface: UploadedFile
Allows to get more information/interact more with the file, depending on where it is stored

Returns:
StorageStrategy the storage strategy of this file,


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.