public class PropertyBuilder extends Object
Constructor and Description |
---|
PropertyBuilder() |
PropertyBuilder(List<Property> props) |
Modifier and Type | Method and Description |
---|---|
String |
getBoundary()
Gets the RFC2045 Content-Type "boundary" parameter.
|
String |
getCharset()
Gets the RFC2045 Content-Type "charset" parameter.
|
String |
getContentDescription()
Gets the MIME Content-Description.
|
Map<String,String> |
getContentDispositionParameters()
Gets RFC2183 Content-Disposition parameters.
|
String |
getContentDispositionType()
Gets the RFC2183 Content-Disposition disposition-type.
|
String |
getContentID()
Gets the MIME Content-ID.
|
List<String> |
getContentLanguage()
Gets the RFC1766 Content-Language.
|
String |
getContentLocation()
Gets the RFC2557 Content-Location.
|
String |
getContentMD5()
Gets the RFC1864 Content-MD5.
|
String |
getContentTransferEncoding()
Gets the MIME Content-Transfer-Encoding.
|
Map<String,String> |
getContentTypeParameters()
Gets RFC2045 Content-Type parameters.
|
String |
getFirstValue(String namespace,
String localName)
Gets the first value with the given name.
|
String |
getMediaType()
Gets the top level MIME content media type.
|
SortedMap<String,String> |
getProperties(String namespace)
Maps properties in the given namespace.
|
String |
getSubType()
Gets the MIME content subtype.
|
Long |
getTextualLineCount()
Gets the number of CRLF in a textual document.
|
List<String> |
getValues(String namespace,
String localName)
Lists all values for a property.
|
void |
setBoundary(String value)
Sets RFC2045 Content-Type "boundary" parameter.
|
void |
setCharset(String value)
Sets RFC2045 Content-Type "charset" parameter.
|
void |
setContentDescription(String value)
Sets MIME Content-Description.
|
void |
setContentDispositionParameters(Map<String,String> valuesByParameterName)
Sets Content-Disposition parameters.
|
void |
setContentDispositionType(String value)
Sets RFC2183 Content-Disposition disposition-type.
|
void |
setContentID(String value)
Sets MIME Content-ID.
|
void |
setContentLanguage(List<String> values)
Sets RFC1766 Content-Language.
|
void |
setContentLocation(String value)
Sets RFC2557 Content-Location.
|
void |
setContentMD5(String value)
Sets RFC1864 Content-MD5.
|
void |
setContentTransferEncoding(String value)
Sets MIME Content-Transfer-Encoding.
|
void |
setContentTypeParameters(Map<String,String> valuesByParameterName)
Sets Content-Type parameters.
|
void |
setMediaType(String value)
Sets the top level MIME content media type.
|
void |
setProperties(String namespace,
Map<String,String> valuesByLocalName)
Sets properties in the given namespace from the map.
|
void |
setProperty(String namespace,
String localName,
List<String> values)
Sets a multiple valued property.
|
void |
setProperty(String namespace,
String localName,
String value)
Sets a property allowing only a single value.
|
void |
setSubType(String value)
Sets the MIME content subtype.
|
void |
setTextualLineCount(Long textualLineCount)
Aets the number of CRLF in a textual document.
|
List<Property> |
toProperties()
Builds a list of properties.
|
String |
toString()
Constructs a
String with all attributes
in name = value format. |
public Long getTextualLineCount()
public void setTextualLineCount(Long textualLineCount)
textualLineCount
- count when document is textual,
null otherwisepublic String getFirstValue(String namespace, String localName)
namespace
- not nulllocalName
- not nullpublic List<String> getValues(String namespace, String localName)
namespace
- not nulllocalName
- not nullpublic void setProperty(String namespace, String localName, String value)
namespace
- not nulllocalName
- not nullvalue
- null to remove propertypublic void setProperty(String namespace, String localName, List<String> values)
namespace
- not nulllocalName
- not nullvalues
- null to remove propertypublic SortedMap<String,String> getProperties(String namespace)
namespace
- not nullpublic void setProperties(String namespace, Map<String,String> valuesByLocalName)
namespace
- not nullvaluesByLocalName
- not nullpublic String getMediaType()
public void setMediaType(String value)
value
- top level MIME content media type,
or null to removepublic String getSubType()
public void setSubType(String value)
value
- the MIME content subtype,
or null to removepublic String getContentID()
public void setContentID(String value)
value
- the MIME content subtype,
or null to removepublic String getContentDescription()
public void setContentDescription(String value)
value
- the MIME Content-Description
or null to removepublic String getContentTransferEncoding()
public void setContentTransferEncoding(String value)
value
- the MIME Content-Transfer-Encoding
or null to removepublic String getContentLocation()
public void setContentLocation(String value)
value
- the RFC2557 Content-Location
or null to removepublic void setContentDispositionType(String value)
value
- the RFC2183 Content-Disposition
or null to removepublic String getContentDispositionType()
public Map<String,String> getContentDispositionParameters()
public void setContentDispositionParameters(Map<String,String> valuesByParameterName)
valuesByParameterName
- values indexed by parameter namepublic Map<String,String> getContentTypeParameters()
public void setContentTypeParameters(Map<String,String> valuesByParameterName)
valuesByParameterName
- values indexed by parameter namepublic String getContentMD5()
public void setContentMD5(String value)
value
- the RFC1864 Content-MD5
or null to removepublic String getCharset()
public void setCharset(String value)
value
- the RFC2045 Content-Type "charset" parameter
or null to removepublic String getBoundary()
public void setBoundary(String value)
value
- the RFC2045 Content-Type "boundary" parameter
or null to removepublic List<String> getContentLanguage()
public void setContentLanguage(List<String> values)
values
- list of parsed language tags from the RFC1766 Content-Language,
possibly emptyCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.