FileDocCategorySizeDatePackage
PartBase.javaAPI DocAndroid 1.5 API4435Wed May 06 22:41:56 BST 2009com.android.internal.http.multipart

PartBase

public abstract class PartBase extends Part
Provides setters and getters for the basic Part properties.
author
Michael Becke

Fields Summary
private String
name
Name of the file part.
private String
contentType
Content type of the file part.
private String
charSet
Content encoding of the file part.
private String
transferEncoding
The transfer encoding.
Constructors Summary
public PartBase(String name, String contentType, String charSet, String transferEncoding)
Constructor.

param
name The name of the part
param
contentType The content type, or null
param
charSet The character encoding, or null
param
transferEncoding The transfer encoding, or null


        if (name == null) {
            throw new IllegalArgumentException("Name must not be null");
        }
        this.name = name;
        this.contentType = contentType;
        this.charSet = charSet;
        this.transferEncoding = transferEncoding;
    
Methods Summary
public java.lang.StringgetCharSet()
Return the character encoding of this part.

return
String The name.

        return this.charSet;
    
public java.lang.StringgetContentType()
Returns the content type of this part.

return
String The name.

        return this.contentType;
    
public java.lang.StringgetName()
Returns the name.

return
The name.
see
Part#getName()

 
        return this.name; 
    
public java.lang.StringgetTransferEncoding()
Returns the transfer encoding of this part.

return
String The name.

        return transferEncoding;
    
public voidsetCharSet(java.lang.String charSet)
Sets the character encoding.

param
charSet the character encoding, or null to exclude the character encoding header

        this.charSet = charSet;
    
public voidsetContentType(java.lang.String contentType)
Sets the content type.

param
contentType the content type, or null to exclude the content type header

        this.contentType = contentType;
    
public voidsetName(java.lang.String name)
Sets the part name.

param
name

        if (name == null) {
            throw new IllegalArgumentException("Name must not be null");
        }
        this.name = name;
    
public voidsetTransferEncoding(java.lang.String transferEncoding)
Sets the transfer encoding.

param
transferEncoding the transfer encoding, or null to exclude the transfer encoding header

        this.transferEncoding = transferEncoding;