com.ning.http.multipart
Class PartBase

java.lang.Object
  extended by com.ning.http.multipart.Part
      extended by com.ning.http.multipart.PartBase
All Implemented Interfaces:
Part
Direct Known Subclasses:
FilePart, StringPart

public abstract class PartBase
extends Part

This class is an adaptation of the Apache HttpClient implementation


Field Summary
 
Fields inherited from class com.ning.http.multipart.Part
CHARSET, CONTENT_DISPOSITION, CONTENT_ID, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, CRLF, EXTRA, QUOTE
 
Constructor Summary
PartBase(String name, String contentType, String charSet, String transferEncoding, String contentId)
          Constructor.
 
Method Summary
 String getCharSet()
          Return the character encoding of this part.
 String getContentId()
          Return the content ID of this part.
 String getContentType()
          Returns the content type of this part.
 String getName()
          Returns the name.
 String getTransferEncoding()
          Returns the transfer encoding of this part.
 void setCharSet(String charSet)
          Sets the character encoding.
 void setContentId(String contentId)
           
 void setContentType(String contentType)
          Sets the content type.
 void setName(String name)
          Sets the part name.
 void setTransferEncoding(String transferEncoding)
          Sets the transfer encoding.
 
Methods inherited from class com.ning.http.multipart.Part
contentIdHeaderLength, contentTypeHeaderLength, dispositionHeaderLength, endLength, endOfHeaderLength, getLengthOfParts, isRepeatable, length, lengthOfData, send, sendContentIdHeader, sendContentTypeHeader, sendData, sendDispositionHeader, sendEnd, sendEndOfHeader, sendMessageEnd, sendPart, sendParts, sendStart, sendTransferEncodingHeader, toString, transferEncodingHeaderLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartBase

public PartBase(String name,
                String contentType,
                String charSet,
                String transferEncoding,
                String contentId)
Constructor.

Parameters:
name - The name of the part
contentType - The content type, or null
charSet - The character encoding, or null
transferEncoding - The transfer encoding, or null
Method Detail

getName

public String getName()
Returns the name.

Specified by:
getName in interface Part
Specified by:
getName in class Part
Returns:
The name.

getContentType

public String getContentType()
Returns the content type of this part.

Specified by:
getContentType in class Part
Returns:
String The name.

getCharSet

public String getCharSet()
Return the character encoding of this part.

Specified by:
getCharSet in class Part
Returns:
String The name.

getTransferEncoding

public String getTransferEncoding()
Returns the transfer encoding of this part.

Specified by:
getTransferEncoding in class Part
Returns:
String The name.

setCharSet

public void setCharSet(String charSet)
Sets the character encoding.

Parameters:
charSet - the character encoding, or null to exclude the character encoding header

setContentType

public void setContentType(String contentType)
Sets the content type.

Parameters:
contentType - the content type, or null to exclude the content type header

setName

public void setName(String name)
Sets the part name.

Parameters:
name -

setTransferEncoding

public void setTransferEncoding(String transferEncoding)
Sets the transfer encoding.

Parameters:
transferEncoding - the transfer encoding, or null to exclude the transfer encoding header

getContentId

public String getContentId()
Description copied from class: Part
Return the content ID of this part.

Specified by:
getContentId in class Part
Returns:
the content ID, or null to exclude the content ID header

setContentId

public void setContentId(String contentId)


Copyright © 2014. All Rights Reserved.