| 
Esri Geoportal Server 1.2.9 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.gpt.agp.multipart2.MPart
public class MPart
A part of an HTTP multi-part request.
Based upon Apache HttpClient 3.1: org.apache.commons.httpclient.methods.multipart
| Constructor Summary | |
|---|---|
MPart()
Default constructor.  | 
|
MPart(String name,
      byte[] data,
      String fileName,
      String contentType,
      String charset)
Constructor.  | 
|
MPart(String name,
      String data)
Constructor.  | 
|
MPart(String name,
      String data,
      String contentType)
Constructor.  | 
|
| Method Summary | |
|---|---|
protected  long | 
dataLength()
Determine the length of the part data in bytes (-1 if unknown).  | 
protected  byte[] | 
getAsciiBytes(String value)
Gets the US-ASCII bytes for a value  | 
 String | 
getBoundary()
Gets the boundary string.  | 
 String | 
getCharset()
Gets the character set.  | 
 String | 
getContentType()
Gets the content type.  | 
 byte[] | 
getData()
Gets the data.  | 
 String | 
getFileName()
Gets the file name.  | 
 String | 
getName()
Gets the part name.  | 
 String | 
getTransferEncoding()
Gets the transfer encoding.  | 
 boolean | 
isRepeatable()
True if the part can be written to the output stream more than once.  | 
 long | 
partLength()
Determine the length of the part in bytes (-1 if unknown).  | 
 void | 
send(OutputStream out)
Write the part to the stream.  | 
protected  void | 
sendContentTypeHeader(OutputStream out)
Write the Content-Type to the stream.  | 
protected  void | 
sendData(OutputStream out)
Write the part data to the stream.  | 
protected  void | 
sendDispositionHeader(OutputStream out)
Write the Content-Disposition to the stream.  | 
protected  void | 
sendEnd(OutputStream out)
Write the bytes that end a part to the stream.  | 
protected  void | 
sendEndOfHeader(OutputStream out)
Write the bytes that end a part header to the stream.  | 
protected  void | 
sendStart(OutputStream out)
Write the bytes that start a part to the stream.  | 
protected  void | 
sendTransferEncodingHeader(OutputStream out)
Write the content Content-Transfer-Encoding to the stream.  | 
 void | 
setBoundary(String boundary)
Sets the boundary string.  | 
 void | 
setCharset(String charset)
Sets the character set.  | 
 void | 
setContentType(String contentType)
Sets the content type.  | 
 void | 
setData(byte[] data)
Sets the data.  | 
 void | 
setFileName(String fileName)
Sets the file name.  | 
 void | 
setName(String name)
Sets the part name.  | 
 void | 
setTransferEncoding(String transferEncoding)
Sets the transfer encoding.  | 
protected  long | 
streamData(InputStream source,
           OutputStream destination)
Stream data from an input to an output.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public MPart()
public MPart(String name,
             String data)
name - the part namedata - the data
public MPart(String name,
             String data,
             String contentType)
name - the part namedata - the datacontentType - the content type
public MPart(String name,
             byte[] data,
             String fileName,
             String contentType,
             String charset)
name - the part namedata - the datafileName - the file namecontentType - the content typecharset - the character set| Method Detail | 
|---|
public String getBoundary()
public void setBoundary(String boundary)
boundary - the boundarypublic String getCharset()
public void setCharset(String charset)
charset - the character setpublic String getContentType()
public void setContentType(String contentType)
contentType - the content typepublic byte[] getData()
public void setData(byte[] data)
data - the datapublic String getFileName()
public void setFileName(String fileName)
fileName - the file namepublic String getName()
public void setName(String name)
name - the part namepublic String getTransferEncoding()
public void setTransferEncoding(String transferEncoding)
transferEncoding - the transfer encoding
protected long dataLength()
                   throws IOException
IOException - if an exception occurs
protected byte[] getAsciiBytes(String value)
                        throws UnsupportedEncodingException
value - the value
UnsupportedEncodingException - if the encoding is unsupportedpublic boolean isRepeatable()
public long partLength()
                throws IOException
IOException - if an exception occurs
public void send(OutputStream out)
          throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendContentTypeHeader(OutputStream out)
                              throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendData(OutputStream out)
                 throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendDispositionHeader(OutputStream out)
                              throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendEnd(OutputStream out)
                throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendEndOfHeader(OutputStream out)
                        throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendStart(OutputStream out)
                  throws IOException
out - the output stream
IOException - if an exception occurs
protected void sendTransferEncodingHeader(OutputStream out)
                                   throws IOException
out - the output stream
IOException - if an exception occurs
protected long streamData(InputStream source,
                          OutputStream destination)
                   throws IOException
source - the input streamdestination - the output stream
IOException - if an exception occurs
  | 
Esri Geoportal Server 1.2.9 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||