org.objectweb.telosys.upload
Class Part

java.lang.Object
  extended byorg.objectweb.telosys.upload.Part

public class Part
extends java.lang.Object

An upload part which represents a INPUT TYPE="file" form parameter


Method Summary
 java.lang.String getContentType()
          Returns the content type of the file data contained within.
 java.lang.String getFileName()
          Returns the name of the file
 java.lang.String getName()
          Returns the name of the form element that this Part corresponds to
 java.lang.String getStringValue()
          Returns the value of the parameter in as a string
 java.lang.String getStringValue(java.lang.String encoding)
          Returns the value of the parameter in as a string
 byte[] getValue()
          Returns an byte array which contains the contents of the file supplied.
 boolean isFile()
          Returns true to indicate this part is a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the form element that this Part corresponds to


getFileName

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


getContentType

public java.lang.String getContentType()
Returns the content type of the file data contained within.

Returns:
content type of the file data.

getValue

public byte[] getValue()
Returns an byte array which contains the contents of the file supplied.


getStringValue

public java.lang.String getStringValue()
                                throws java.io.UnsupportedEncodingException
Returns the value of the parameter in as a string

Throws:
java.io.UnsupportedEncodingException

getStringValue

public java.lang.String getStringValue(java.lang.String encoding)
                                throws java.io.UnsupportedEncodingException
Returns the value of the parameter in as a string

Throws:
java.io.UnsupportedEncodingException

isFile

public boolean isFile()
Returns true to indicate this part is a file.