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

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.FilePart
              extended byat.knowcenter.wag.egov.egiz.sig.connectors.moa.FilePartMR

public class FilePartMR
extends org.apache.commons.httpclient.methods.multipart.FilePart


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.FilePart
DEFAULT_CHARSET, DEFAULT_CONTENT_TYPE, DEFAULT_TRANSFER_ENCODING, FILE_NAME
 
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
FilePartMR(String arg0, File arg1)
           
FilePartMR(String arg0, File arg1, String arg2, String arg3)
           
FilePartMR(String arg0, org.apache.commons.httpclient.methods.multipart.PartSource arg1)
           
FilePartMR(String arg0, org.apache.commons.httpclient.methods.multipart.PartSource arg1, String arg2, String arg3)
           
FilePartMR(String arg0, String arg1, File arg2)
           
FilePartMR(String arg0, String arg1, File arg2, String arg3, String arg4)
           
 
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
 void setContentID(String contentid)
           
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.FilePart
getSource, lengthOfData, sendData, sendDispositionHeader
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.PartBase
getCharSet, getContentType, getName, getTransferEncoding, setCharSet, setContentType, setName, setTransferEncoding
 
Methods inherited from class org.apache.commons.httpclient.methods.multipart.Part
getBoundary, getLengthOfParts, getLengthOfParts, getPartBoundary, isRepeatable, sendContentTypeHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, 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

FilePartMR

public FilePartMR(String arg0,
                  org.apache.commons.httpclient.methods.multipart.PartSource arg1)

FilePartMR

public FilePartMR(String arg0,
                  File arg1)
           throws FileNotFoundException

FilePartMR

public FilePartMR(String arg0,
                  String arg1,
                  File arg2)
           throws FileNotFoundException

FilePartMR

public FilePartMR(String arg0,
                  org.apache.commons.httpclient.methods.multipart.PartSource arg1,
                  String arg2,
                  String arg3)

FilePartMR

public FilePartMR(String arg0,
                  File arg1,
                  String arg2,
                  String arg3)
           throws FileNotFoundException

FilePartMR

public FilePartMR(String arg0,
                  String arg1,
                  File arg2,
                  String arg3,
                  String arg4)
           throws FileNotFoundException
Method Detail

setContentID

public void setContentID(String contentid)

getContentID

public String getContentID()

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.

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.