public class MultiPartRelatedInputStream extends MultiPartInputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
boundary
Field boundary
|
protected BoundaryDelimitedStream |
boundaryDelimitedStream
Field boundaryDelimitedStream
|
protected java.io.ByteArrayInputStream |
cachedSOAPEnvelope
Field cachedSOAPEnvelope
|
protected boolean |
closed
Field closed
|
protected java.lang.String |
contentId
Field contentId
|
protected java.lang.String |
contentLocation
Field contentLocation
|
protected boolean |
eos
Field eos
|
protected static org.apache.commons.logging.Log |
log
Field log
|
static java.lang.String |
MIME_MULTIPART_RELATED
Field MIME_MULTIPART_RELATED
|
protected java.util.LinkedList |
orderedParts
Field orderedParts
|
protected java.util.HashMap |
parts
Field parts
|
protected static java.lang.String[] |
READ_ALL
Field READ_ALL
|
protected int |
rootPartLength
Field rootPartLength
|
protected java.io.InputStream |
soapStream
Field soapStream
|
protected java.io.InputStream |
soapStreamBDS
Field soapStreamBDS
|
| Constructor and Description |
|---|
MultiPartRelatedInputStream(java.lang.String contentType,
java.io.InputStream stream)
Create a new Multipart stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPart(java.lang.String contentId,
java.lang.String locationId,
AttachmentPart ap)
Add an
AttachmentPart together with its content and location
IDs. |
int |
available() |
void |
close() |
Part |
getAttachmentByReference(java.lang.String[] id) |
java.util.Collection |
getAttachments() |
java.lang.String |
getContentId()
Return the content id of the stream.
|
java.lang.String |
getContentLocation()
Return the content location.
|
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
protected void |
readAll()
Read all data.
|
protected Part |
readTillFound(java.lang.String[] id)
This will read streams in till the one that is needed is found.
|
protected static org.apache.commons.logging.Log log
public static final java.lang.String MIME_MULTIPART_RELATED
protected java.util.HashMap parts
protected java.util.LinkedList orderedParts
protected int rootPartLength
protected boolean closed
protected boolean eos
protected BoundaryDelimitedStream boundaryDelimitedStream
protected java.io.InputStream soapStream
protected java.io.InputStream soapStreamBDS
protected byte[] boundary
protected java.io.ByteArrayInputStream cachedSOAPEnvelope
protected java.lang.String contentLocation
protected java.lang.String contentId
protected static final java.lang.String[] READ_ALL
public MultiPartRelatedInputStream(java.lang.String contentType,
java.io.InputStream stream)
throws AxisFault
contentType - the string that holds the contentTypestream - the true input stream from where the sourceAxisFault - if the stream could not be createdpublic Part getAttachmentByReference(java.lang.String[] id) throws AxisFault
getAttachmentByReference in class MultiPartInputStreamAxisFaultprotected void addPart(java.lang.String contentId,
java.lang.String locationId,
AttachmentPart ap)
AttachmentPart together with its content and location
IDs.contentId - the content IDlocationId - the location IDap - the AttachmentPartprotected void readAll()
throws AxisFault
AxisFault - if there was a problem reading all the
datapublic java.util.Collection getAttachments()
throws AxisFault
getAttachments in class MultiPartInputStreamAxisFaultprotected Part readTillFound(java.lang.String[] id) throws AxisFault
id - id is the stream being sought.AxisFaultpublic java.lang.String getContentLocation()
MultiPartInputStreamgetContentLocation in class MultiPartInputStreampublic java.lang.String getContentId()
MultiPartInputStreamgetContentId in class MultiPartInputStreampublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterInputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.FilterInputStreamjava.io.IOExceptionCopyright ? 2005 Apache Web Services Project. All Rights Reserved.