com.devsphere.mapping
Class FileBean

java.lang.Object
  |
  +--com.devsphere.mapping.FileBean
All Implemented Interfaces:
java.io.Serializable

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

Bean that groups the name, the content type and the input stream of an uploaded file.

Note: The input stream property is implemented as a transient field, so it isn't serialized in case you write this bean to an java.io.ObjectOutputStream.

See Also:
Serialized Form

Constructor Summary
FileBean(java.lang.String fileName, java.lang.String contentType, java.io.InputStream inputStream)
          Creates a file bean.
 
Method Summary
 java.lang.String getContentType()
          Gets the content type.
 java.lang.String getFileName()
          Gets the file name.
 java.io.InputStream getInputStream()
          Gets the input stream.
 java.lang.String toString()
          Returns a string representation of this bean containing the file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileBean

public FileBean(java.lang.String fileName,
                java.lang.String contentType,
                java.io.InputStream inputStream)
Creates a file bean.
Method Detail

getFileName

public java.lang.String getFileName()
Gets the file name.
Returns:
the file name.

getContentType

public java.lang.String getContentType()
Gets the content type.
Returns:
the content type.

getInputStream

public java.io.InputStream getInputStream()
Gets the input stream. Subsequent calls of this method return the same InputStream object
Returns:
the input stream.

toString

public java.lang.String toString()
Returns a string representation of this bean containing the file name.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this point.