|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.etill.kitcashcassette.io.MimeInputStream
This class defines a Mime wrapped InputStream. It reads data from an Input
stream, looks for the Mime header, processes it to extract the known
fields. When the length is found, it reads the message that is Mime
wrapped.
HOW TO USE IT
- connect this class to a TimeOutInputStream (done in the constructor)
- call readMime() to process the stream. If the TimeOutInputStream doesn't
contain any MimeHeader an IOException is thrown.
- if the TimeOutInputStream does contain a Mime Header the getters
readXxxx() can be called to retrieved the values of the fields.
Field Summary | |
---|---|
protected TimeOutInputStream |
tois
|
Fields inherited from interface com.ibm.etill.kitcashcassette.io.MimeConst |
---|
MAX_SIZE_MIMEHEADER, MHL_CTENCODING, MHL_CTENCODING_7BIT, MHL_CTENCODING_BIN, MHL_CTYPE, MHL_CTYPE_APP, MHL_CTYPE_CLASS, MHL_CTYPE_CLASS_CLOSING, MHL_CTYPE_CLASS_FAILED, MHL_CTYPE_CLASS_INFO, MHL_CTYPE_CLASS_RETRY, MHL_CTYPE_CONTROL, MHL_CTYPE_CONTROL_CLOSE, MHL_CTYPE_CONTROL_CLOSER, MHL_CTYPE_CONTROL_ECHO, MHL_CTYPE_CONTROL_ECHOR, MHL_CTYPE_CONTROL_STATUS, MHL_CTYPE_DELAY, MHL_CTYPE_MSGTAG, MHL_CTYPE_SEP, MHL_CTYPE_TXT, MHL_EOHEADER, MHL_EOL, MHL_EQUAL, MHL_LENGTH, MHL_MVERSION, MHL_SEP, MHL_SPACE, MHL_VERSION |
Constructor Summary | |
---|---|
MimeInputStream(TimeOutInputStream tois)
Creates a new Mime input stream to read data from the specified TimeOut input stream. |
Method Summary | |
---|---|
java.lang.String |
getContentType()
Returns the content-type field found after calling the readMime() method. |
java.lang.String |
getContentTypeClass()
Returns the content-type class field found after calling the readMime() method. |
java.lang.String |
getContentTypeControl()
Returns the content-type control field found after calling the readMime() method. |
int |
getContentTypeDelay()
Returns the content-type delay field found after calling the readMime() method. |
java.lang.String |
getContentTypeMsgTag()
Returns the content-type message tag field found after calling the readMime() method. |
java.lang.String |
getEncoding()
Returns the encoding field found after calling the readMime() method. |
int |
getLength()
Returns the Length field found after calling the readMime() method. |
byte[] |
getMessage()
Returns the byte array containing the message found after calling the readMime() method. |
java.lang.String |
getMimeVersion()
Returns the Mime version field found after calling the readMime() method. |
void |
readMime()
This method reads and parses a Mime wrapped TimeOutInputStream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TimeOutInputStream tois
Constructor Detail |
public MimeInputStream(TimeOutInputStream tois)
tois
- the TimeOut input streamMethod Detail |
public java.lang.String getContentType()
public java.lang.String getContentTypeClass()
public java.lang.String getContentTypeControl()
public int getContentTypeDelay()
public java.lang.String getContentTypeMsgTag()
public java.lang.String getEncoding()
public int getLength()
public byte[] getMessage()
public java.lang.String getMimeVersion()
public void readMime() throws java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |