public class MultiPartDimeInputStream extends MultiPartInputStream
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
boundary |
protected ByteArrayInputStream |
cachedSOAPEnvelope |
protected boolean |
closed |
protected String |
contentId |
protected DimeDelimitedInputStream |
dimeDelimitedStream |
protected boolean |
eos |
protected static org.apache.commons.logging.Log |
log |
protected LinkedList |
orderedParts |
protected HashMap |
parts |
protected static String[] |
READ_ALL |
protected int |
rootPartLength |
protected InputStream |
soapStream |
in| Constructor and Description |
|---|
MultiPartDimeInputStream(InputStream is)
Create a new Multipart stream from an input stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPart(String contentId,
String locationId,
AttachmentPart ap) |
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() |
protected Part |
readTillFound(String[] id)
This will read streams in till the one that is needed is found.
|
available, mark, markSupported, reset, skipprotected static org.apache.commons.logging.Log log
protected HashMap parts
protected LinkedList orderedParts
protected int rootPartLength
protected boolean closed
protected boolean eos
protected DimeDelimitedInputStream dimeDelimitedStream
protected InputStream soapStream
protected byte[] boundary
protected ByteArrayInputStream cachedSOAPEnvelope
protected String contentId
protected static final String[] READ_ALL
public MultiPartDimeInputStream(InputStream is) throws IOException
is - the true input stream that is read fromIOException - if it was not possible to build the Multipartpublic Part getAttachmentByReference(String[] id) throws AxisFault
getAttachmentByReference in class MultiPartInputStreamAxisFaultprotected void addPart(String contentId, String locationId, AttachmentPart ap)
public Collection getAttachments() throws AxisFault
getAttachments in class MultiPartInputStreamAxisFaultprotected Part readTillFound(String[] id) throws IOException
id - is the stream being soughtPart matching the idsIOExceptionpublic String getContentLocation()
getContentLocation in class MultiPartInputStreampublic String getContentId()
getContentId in class MultiPartInputStreampublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionCopyright © The Apache Software Foundation. All Rights Reserved.