Class ContentDataPart


  • public class ContentDataPart
    extends org.apache.commons.httpclient.methods.multipart.PartBase
    Author:
    brian
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static String FILE_NAME
      Attachment's 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected long lengthOfData()  
      protected void sendData​(OutputStream out)  
      protected void sendDispositionHeader​(OutputStream out)
      Write the disposition header to the output stream
      • 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, length, send, sendContentTypeHeader, sendEnd, sendEndOfHeader, sendParts, sendParts, sendStart, sendTransferEncodingHeader, toString
    • Constructor Detail

      • ContentDataPart

        public ContentDataPart​(ContentService contentService,
                               String partName,
                               ContentData data)
        ContentDataPart
        Parameters:
        contentService - content service
        partName - String
        data - data
    • Method Detail

      • sendDispositionHeader

        protected void sendDispositionHeader​(OutputStream out)
                                      throws IOException
        Write the disposition header to the output stream
        Overrides:
        sendDispositionHeader in class org.apache.commons.httpclient.methods.multipart.Part
        Parameters:
        out - The output stream
        Throws:
        IOException - If an IO problem occurs
        See Also:
        Part.sendDispositionHeader(OutputStream)
      • lengthOfData

        protected long lengthOfData()
                             throws IOException
        Specified by:
        lengthOfData in class org.apache.commons.httpclient.methods.multipart.Part
        Throws:
        IOException
      • sendData

        protected void sendData​(OutputStream out)
                         throws IOException
        Specified by:
        sendData in class org.apache.commons.httpclient.methods.multipart.Part
        Throws:
        IOException