|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.nntp.spi.MimeTools
public class MimeTools
Pure MIME related tools.
Nested Class Summary | |
---|---|
static class |
MimeTools.Header
Data structure containing a single header name/value pair. |
static class |
MimeTools.Headers
Contains the parsed article information. |
Field Summary | |
---|---|
static java.lang.String |
EXTRA_HEADER_PROP_PREFIX
Message property prefix for extra headers |
Method Summary | |
---|---|
static java.lang.String |
detectUuencodedStart(java.lang.String line)
Locates the start of a uuencoded section. |
static java.lang.String |
getMIMEBoundary(java.lang.String contentType)
Obtain the MIME boundary string if one exists. |
static java.nio.charset.Charset |
getMIMECharset(java.lang.String contentType)
Obtain the charset for a MIME part if one exists. |
static java.lang.String |
getMIMEName(java.lang.String contentType)
Obtain the MIME name for a MIME part if one exists. |
static java.lang.String |
getMIMEType(java.lang.String contentType)
Obtain the MIME type for a MIME part if one exists. |
static MimeTools.Header |
parseHeader(java.lang.String header)
Parse a single header for the name and value. |
static MimeTools.Headers |
parseHeaders(java.util.Iterator headIter)
Parses the headers from the list and returns a map of header to value fields in the map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String EXTRA_HEADER_PROP_PREFIX
Method Detail |
---|
public static final java.lang.String getMIMEType(java.lang.String contentType)
contentType
- the Content-Type: header value.
public static final java.lang.String getMIMEName(java.lang.String contentType)
contentType
- the Content-Type: header value.
public static final java.lang.String getMIMEBoundary(java.lang.String contentType)
contentType
- the Content-Type: header value.
public static final java.nio.charset.Charset getMIMECharset(java.lang.String contentType)
contentType
- the Content-Type: header value.
public static final MimeTools.Headers parseHeaders(java.util.Iterator headIter)
Parses the headers from the list and returns a map of header to value fields in the map. Headers present but empty, or not recognized will be ignored. Currently the parser cares only about the following headers:
We specifically ignore the following headers because they are determined by the session and are therefore forced to match Forum settings:
Any other headers (those not listed above) will be added to the headers map.
headIter
- an iterator of the strings making up the raw article.
public static java.lang.String detectUuencodedStart(java.lang.String line)
line
- the line to inspect for a uuencoded start marker.
public static final MimeTools.Header parseHeader(java.lang.String header)
header
- the header line to parse.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |