public class MIMEReader
extends java.lang.Object
MIMEReader reads the MIME from a given input stream.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
FAULT_MALFORMED_HEADERFIELD |
protected static java.lang.String |
FAULT_NOT_FINISHED |
protected static java.lang.String |
FAULT_UNEXPECTED_END |
protected HTTPInputStream |
in |
protected org.ws4d.java.communication.protocol.mime.MIMEReader.MIMEInputStream |
mimeIn |
| Constructor and Description |
|---|
MIMEReader(HTTPInputStream in,
byte[] boundary) |
MIMEReader(HTTPInputStream in,
byte[] boundary,
Sync incomingMIMEPartLock) |
| Modifier and Type | Method and Description |
|---|---|
void |
consume(java.io.InputStream streamToConsume) |
java.io.InputStream |
getInputStream()
Returns the input stream for this processor.
|
MIMEBodyHeader |
getMIMEBodyHeader()
Returns the MIME body header.
|
int |
getPartNumber()
Returns the number of the current part.
|
java.lang.String |
getUniqueId() |
boolean |
nextPart()
Returns
true if there is another part (next InputStream) to read. |
void |
waitFor() |
protected static final java.lang.String FAULT_UNEXPECTED_END
protected static final java.lang.String FAULT_MALFORMED_HEADERFIELD
protected static final java.lang.String FAULT_NOT_FINISHED
protected HTTPInputStream in
protected org.ws4d.java.communication.protocol.mime.MIMEReader.MIMEInputStream mimeIn
public MIMEReader(HTTPInputStream in, byte[] boundary) throws java.io.IOException
java.io.IOExceptionpublic MIMEReader(HTTPInputStream in, byte[] boundary, Sync incomingMIMEPartLock) throws java.io.IOException
java.io.IOExceptionpublic boolean nextPart()
throws java.io.IOException
true if there is another part (next InputStream) to read.
This method throws a IOExcpetion if someone tries to invoke this method before the
previous part is read completely or if another I/O error occurs.true if there is another part. false otherwise.java.io.IOExceptionpublic int getPartNumber()
public MIMEBodyHeader getMIMEBodyHeader()
public java.io.InputStream getInputStream()
nextPart().InputStream.public void consume(java.io.InputStream streamToConsume)
throws java.io.IOException
java.io.IOExceptionpublic void waitFor()
public java.lang.String getUniqueId()