org.apache.myfaces.custom.fileupload

Class UploadedFileDefaultImplBase

Implemented Interfaces:
Serializable, UploadedFile
Known Direct Subclasses:
UploadedFileDefaultFileImpl, UploadedFileDefaultMemoryImpl

public abstract class UploadedFileDefaultImplBase
extends java.lang.Object
implements UploadedFile

Version:
$Revision: 209487 $ $Date: 2005-07-06 19:49:15 +0200 (Wed, 06 Jul 2005) $
Author:
Sylvain Vieujot (latest modification by $Author: grantsmith $)

Constructor Summary

UploadedFileDefaultImplBase(String name, String contentType)

Method Summary

abstract byte[]
getBytes()
Answer the uploaded file contents.
String
getContentType()
abstract InputStream
getInputStream()
Answer the uploaded file contents input stream
String
getName()
abstract long
getSize()
Answer the size of this file.

Constructor Details

UploadedFileDefaultImplBase

protected UploadedFileDefaultImplBase(String name,
                                      String contentType)

Method Details

getBytes

public abstract byte[] getBytes()
            throws IOException
Answer the uploaded file contents.
Specified by:
getBytes in interface UploadedFile
Returns:
file contents

getContentType

public String getContentType()
Specified by:
getContentType in interface UploadedFile
Returns:
Returns the _contentType.

getInputStream

public abstract InputStream getInputStream()
            throws IOException
Answer the uploaded file contents input stream
Specified by:
getInputStream in interface UploadedFile
Returns:
InputStream

getName

public String getName()
Specified by:
getName in interface UploadedFile
Returns:
Returns the _name.

getSize

public abstract long getSize()
Answer the size of this file.
Specified by:
getSize in interface UploadedFile
Returns:
long