Oracle

com.compoze.util
Class Part

java.lang.Object
  extended by com.compoze.util.Part
All Implemented Interfaces:
java.io.Serializable

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

A class that encapsulates a part in a multi-part form.

See Also:
MultiPartFormData, Serialized Form

Method Summary
 byte[] getBytes()
          Get the part as a byte array.
 java.lang.String getContentDisposition()
          Get the Content-Disposition of the part.
 java.lang.String getContentDispositionValue(java.lang.String sKey)
          Get the value of a Content-Disposition parameter.
 java.lang.String getContentType()
          Get the Content-Type of the part.
 java.io.InputStream getInputStream()
          Get an InputStream to the part form data.
 int getLength()
          Get the length of the part.
 java.lang.String getName()
          Get the part name.
 java.lang.String getParameter(java.lang.String sParmName)
          Get a parameter of the part.
 java.util.HashMap getParameters()
          Get all of the parameters of the part.
 java.lang.String getString()
          Get the part as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public java.lang.String getString()
Get the part as a String.

Returns:
the part in string form

getName

public java.lang.String getName()
Get the part name.

Returns:
the part name

getBytes

public byte[] getBytes()
Get the part as a byte array.

Returns:
the part as a byte array

getInputStream

public java.io.InputStream getInputStream()
Get an InputStream to the part form data.

Returns:
the input stream to the part form data

getParameter

public java.lang.String getParameter(java.lang.String sParmName)
Get a parameter of the part.

Parameters:
sParmName - the parameter name
Returns:
the value of the parameter

getParameters

public java.util.HashMap getParameters()
Get all of the parameters of the part.

Returns:
a hash map with all of the parameters of the part

getContentType

public java.lang.String getContentType()
Get the Content-Type of the part.

Returns:
the content type

getContentDisposition

public java.lang.String getContentDisposition()
Get the Content-Disposition of the part.

Returns:
the content disposition

getContentDispositionValue

public java.lang.String getContentDispositionValue(java.lang.String sKey)
Get the value of a Content-Disposition parameter.

Parameters:
sKey - the key to the Content-Disposition parameter
Returns:
the Content-Disposition parameter

getLength

public int getLength()
Get the length of the part.

Returns:
the length of the part

Oracle

Copyright ©1999-2008 Oracle All rights reserved.