org.apache.myfaces.custom.fileupload
Class UploadedFileDefaultMemoryImpl

java.lang.Object
  |
  +--org.apache.myfaces.custom.fileupload.UploadedFileDefaultImplBase
        |
        +--org.apache.myfaces.custom.fileupload.UploadedFileDefaultMemoryImpl
All Implemented Interfaces:
java.io.Serializable, UploadedFile

public class UploadedFileDefaultMemoryImpl
extends UploadedFileDefaultImplBase

Version:
$Revision: 1.5 $ $Date: 2004/10/13 11:50:57 $ $Log: UploadedFileDefaultMemoryImpl.java,v $ Revision 1.5 2004/10/13 11:50:57 matze renamed packages to org.apache Revision 1.4 2004/09/11 02:48:23 svieujot Remove empty constructor Revision 1.3 2004/09/03 12:43:57 manolito File item transient in file based UploadedFile and no more empty constructors Revision 1.2 2004/07/14 06:10:18 svieujot Remove debug messages Revision 1.1 2004/07/14 06:02:48 svieujot FileUpload : split file based and memory based implementation. Use the storage="memory|file" attribute. Default is memory because file based implementation fails to serialize.
Author:
Sylvain Vieujot (latest modification by $Author: matze $)
See Also:
Serialized Form

Constructor Summary
UploadedFileDefaultMemoryImpl(org.apache.commons.fileupload.FileItem fileItem)
           
 
Method Summary
 byte[] getBytes()
          Answer the uploaded file contents.
 java.io.InputStream getInputStream()
          Answer the uploaded file contents input stream
 long getSize()
          Answer the size of this file.
 
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 java.io.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 java.io.InputStream getInputStream()
                                   throws java.io.IOException
Answer the uploaded file contents input stream

Specified by:
getInputStream in interface UploadedFile
Specified by:
getInputStream in class UploadedFileDefaultImplBase
Returns:
Throws:
java.io.IOException

getSize

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

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