at.knowcenter.wag.egov.egiz.sig.connectors.moa
Class StringPartMR

java.lang.Object
  extended byorg.apache.commons.httpclient.methods.multipart.Part
      extended byorg.apache.commons.httpclient.methods.multipart.PartBase
          extended byorg.apache.commons.httpclient.methods.multipart.StringPart
              extended byat.knowcenter.wag.egov.egiz.sig.connectors.moa.StringPartMR

public class StringPartMR
extends org.apache.commons.httpclient.methods.multipart.StringPart


Field Summary
protected static String CONTENT_ID
          Content dispostion characters
protected static byte[] CONTENT_ID_BYTES
          Content dispostion as a byte array
 
Fields inherited from class org.apache.commons.httpclient.methods.multipart.StringPart
DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE, DEFAULT_TRANSFER_ENCODING
 
Fields inherited from class org.apache.commons.httpclient.methods.multipart.Part
BOUNDARY, BOUNDARY_BYTES, CHARSET, CHARSET_BYTES, CONTENT_DISPOSITION, CONTENT_DISPOSITION_BYTES, CONTENT_TRANSFER_ENCODING, CONTENT_TRANSFER_ENCODING_BYTES, CONTENT_TYPE, CONTENT_TYPE_BYTES, CRLF, CRLF_BYTES, EXTRA, EXTRA_BYTES, QUOTE, QUOTE_BYTES
 
Constructor Summary
StringPartMR(String name, String value)
           
StringPartMR(String name, String value, String charset)
           
 
Method Summary
 String getContentID()
           
 long length()
          Return the full length of all the data.
 void send(OutputStream out)
          Write all the data to the output stream.
protected  void sendContentIDHeader(OutputStream out)
          Write the content id header to the specified output stream
protected  void sendContentTypeHeader(OutputStream out)
          Write the content type header to the specified output stream
protected  void sendDispositionHeader(OutputStream out)
          Write the content disposition header to the specified output stream
protected  void sendEndOfHeader(OutputStream out)
          Write the end of the header to the output stream
protected  void sendTransferEncodingHeader(OutputStream out)
          Write the content transfer encoding header to the specified output stream
 void setContentID(String contentid)
           
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.StringPart
lengthOfData, sendData, setCharSet
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.PartBase
getCharSet, getContentType, getName, getTransferEncoding, setContentType, setName, setTransferEncoding
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, sendEnd, sendParts, sendParts, sendStart, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTENT_ID

protected static final String CONTENT_ID
Content dispostion characters

See Also:
Constant Field Values

CONTENT_ID_BYTES

protected static final byte[] CONTENT_ID_BYTES
Content dispostion as a byte array

Constructor Detail

StringPartMR

public StringPartMR(String name,
                    String value,
                    String charset)

StringPartMR

public StringPartMR(String name,
                    String value)
Method Detail

sendDispositionHeader

protected void sendDispositionHeader(OutputStream out)
                              throws IOException
Write the content disposition header to the specified output stream

Parameters:
out - The output stream
Throws:
IOException - If an IO problem occurs.

sendContentIDHeader

protected void sendContentIDHeader(OutputStream out)
                            throws IOException
Write the content id header to the specified output stream

Parameters:
out - The output stream
Throws:
IOException - If an IO problem occurs.

sendContentTypeHeader

protected void sendContentTypeHeader(OutputStream out)
                              throws IOException
Write the content type header to the specified output stream

Parameters:
out - The output stream
Throws:
IOException - If an IO problem occurs.

sendTransferEncodingHeader

protected void sendTransferEncodingHeader(OutputStream out)
                                   throws IOException
Write the content transfer encoding header to the specified output stream

Parameters:
out - The output stream
Throws:
IOException - If an IO problem occurs.

setContentID

public void setContentID(String contentid)

getContentID

public String getContentID()

sendEndOfHeader

protected void sendEndOfHeader(OutputStream out)
                        throws IOException
Write the end of the header to the output stream

Parameters:
out - The output stream
Throws:
IOException - If an IO problem occurs.

send

public void send(OutputStream out)
          throws IOException
Write all the data to the output stream. If you override this method make sure to override #length() as well

Parameters:
out - The output stream
Throws:
IOException - If an IO problem occurs.

length

public long length()
            throws IOException
Return the full length of all the data. If you override this method make sure to override #send(OutputStream) as well

Returns:
long The length.
Throws:
IOException - If an IO problem occurs


Copyright © 2006-2010. All Rights Reserved.