public class MultiPartRelatedInputStream extends MultiPartInputStream
Modifier and Type | Field and Description |
---|---|
protected byte[] |
boundary
Field boundary
|
protected BoundaryDelimitedStream |
boundaryDelimitedStream
Field boundaryDelimitedStream
|
protected ByteArrayInputStream |
cachedSOAPEnvelope
Field cachedSOAPEnvelope
|
protected boolean |
closed
Field closed
|
protected String |
contentId
Field contentId
|
protected String |
contentLocation
Field contentLocation
|
protected boolean |
eos
Field eos
|
protected static org.apache.commons.logging.Log |
log
Field log
|
static String |
MIME_MULTIPART_RELATED
Field MIME_MULTIPART_RELATED
|
protected LinkedList |
orderedParts
Field orderedParts
|
protected HashMap |
parts
Field parts
|
protected static String[] |
READ_ALL
Field READ_ALL
|
protected int |
rootPartLength
Field rootPartLength
|
protected InputStream |
soapStream
Field soapStream
|
protected InputStream |
soapStreamBDS
Field soapStreamBDS
|
in
Constructor and Description |
---|
MultiPartRelatedInputStream(String contentType,
InputStream stream)
Create a new Multipart stream.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPart(String contentId,
String locationId,
AttachmentPart ap)
Add an
AttachmentPart together with its content and location
IDs. |
int |
available() |
void |
close() |
Part |
getAttachmentByReference(String[] id) |
Collection |
getAttachments() |
String |
getContentId()
Return the content id of the stream.
|
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(String[] id)
This will read streams in till the one that is needed is found.
|
mark, markSupported, reset, skip
protected static org.apache.commons.logging.Log log
public static final String MIME_MULTIPART_RELATED
protected HashMap parts
protected LinkedList orderedParts
protected int rootPartLength
protected boolean closed
protected boolean eos
protected BoundaryDelimitedStream boundaryDelimitedStream
protected InputStream soapStream
protected InputStream soapStreamBDS
protected byte[] boundary
protected ByteArrayInputStream cachedSOAPEnvelope
protected String contentLocation
protected String contentId
protected static final String[] READ_ALL
public MultiPartRelatedInputStream(String contentType, 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(String[] id) throws AxisFault
getAttachmentByReference
in class MultiPartInputStream
AxisFault
protected void addPart(String contentId, String locationId, AttachmentPart ap)
AttachmentPart
together with its content and location
IDs.contentId
- the content IDlocationId
- the location IDap
- the AttachmentPart
protected void readAll() throws AxisFault
AxisFault
- if there was a problem reading all the
datapublic Collection getAttachments() throws AxisFault
getAttachments
in class MultiPartInputStream
AxisFault
protected Part readTillFound(String[] id) throws AxisFault
id
- id is the stream being sought.AxisFault
public String getContentLocation()
MultiPartInputStream
getContentLocation
in class MultiPartInputStream
public String getContentId()
MultiPartInputStream
getContentId
in class MultiPartInputStream
public int read(byte[] b, int off, int len) throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] b) throws IOException
read
in class FilterInputStream
IOException
public int read() throws IOException
read
in class FilterInputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
public int available() throws IOException
available
in class FilterInputStream
IOException
Copyright © The Apache Software Foundation. All Rights Reserved.