|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.commons.impl.MimeHelper
public class MimeHelper
MIME helper class.
Nested Class Summary | |
---|---|
protected static class |
MimeHelper.HeaderTokenizer
|
protected static class |
MimeHelper.ParseException
|
protected static class |
MimeHelper.Token
|
Field Summary | |
---|---|
static String |
CONTENT_DISPOSITION
|
static String |
DISPOSITION_ATTACHMENT
|
static String |
DISPOSITION_FILENAME
|
Method Summary | |
---|---|
static String |
decodeContentDisposition(String value,
Map<String,String> params)
Decodes the Content-Disposition header value according to RFC 2183 and RFC 2231. |
static String |
decodeContentDispositionFilename(String value)
Decodes a filename from the Content-Disposition header value according to RFC 2183 and RFC 2231. |
protected static String |
decodeRFC2231value(String value)
|
static String |
encodeContentDisposition(String disposition,
String filename)
Encodes the Content-Disposition header value according to RFC 2183 and RFC 2231. |
protected static String |
encodeRFC2231(String key,
String value)
Encodes a MIME parameter per RFC 2231. |
protected static boolean |
encodeRFC2231value(String value,
StringBuilder buf)
Encodes a value per RFC 2231. |
protected static byte[] |
fromHex(String data)
|
protected static String |
getJavaCharset(String mimeCharset)
|
protected static Map<String,String> |
getParameters(String list,
Map<String,String> params)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONTENT_DISPOSITION
public static final String DISPOSITION_ATTACHMENT
public static final String DISPOSITION_FILENAME
Method Detail |
---|
protected static boolean encodeRFC2231value(String value, StringBuilder buf)
This is used to pass non-ASCII parameters to MIME parameter lists.
This implementation always uses UTF-8 and no language.
See RFC 2231 for details.
value
- the value to encodebuf
- the buffer to fill
true
if an encoding was needed, or false
if no
encoding was actually neededprotected static String encodeRFC2231(String key, String value)
This implementation always uses UTF-8 and no language.
See RFC 2231 for details.
value
- the string to encode
public static String encodeContentDisposition(String disposition, String filename)
See RFC 2231 for details.
disposition
- the dispositionfilename
- the file name
public static String decodeContentDispositionFilename(String value)
See RFC 2231 for details.
value
- the header value to decode
public static String decodeContentDisposition(String value, Map<String,String> params)
Does not deal with continuation lines.
See RFC 2231 for details.
value
- the header value to decodeparams
- the map of parameters to fill
protected static Map<String,String> getParameters(String list, Map<String,String> params) throws MimeHelper.ParseException
MimeHelper.ParseException
protected static String decodeRFC2231value(String value)
protected static byte[] fromHex(String data)
protected static String getJavaCharset(String mimeCharset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |