org.apache.axis.attachments
Class MultiPartDimeInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.axis.attachments.MultiPartInputStream
org.apache.axis.attachments.MultiPartDimeInputStream
- All Implemented Interfaces:
- Closeable
public class MultiPartDimeInputStream
- extends MultiPartInputStream
This simulates the multipart stream.
- Author:
- Rick Rineholt
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
parts
protected HashMap parts
orderedParts
protected LinkedList orderedParts
rootPartLength
protected int rootPartLength
closed
protected boolean closed
eos
protected boolean eos
dimeDelimitedStream
protected DimeDelimitedInputStream dimeDelimitedStream
soapStream
protected InputStream soapStream
boundary
protected byte[] boundary
cachedSOAPEnvelope
protected ByteArrayInputStream cachedSOAPEnvelope
contentId
protected String contentId
READ_ALL
protected static final String[] READ_ALL
MultiPartDimeInputStream
public MultiPartDimeInputStream(InputStream is)
throws IOException
- Create a new Multipart stream from an input stream.
- Parameters:
is - the true input stream that is read from
- Throws:
IOException - if it was not possible to build the Multipart
getAttachmentByReference
public Part getAttachmentByReference(String[] id)
throws AxisFault
- Specified by:
getAttachmentByReference in class MultiPartInputStream
- Throws:
AxisFault
addPart
protected void addPart(String contentId,
String locationId,
AttachmentPart ap)
readAll
protected void readAll()
throws AxisFault
- Throws:
AxisFault
getAttachments
public Collection getAttachments()
throws AxisFault
- Specified by:
getAttachments in class MultiPartInputStream
- Throws:
AxisFault
readTillFound
protected Part readTillFound(String[] id)
throws IOException
- This will read streams in till the one that is needed is found.
- Parameters:
id - is the stream being sought
- Returns:
- a
Part matching the ids
- Throws:
IOException
getContentLocation
public String getContentLocation()
- Return the content location.
- Specified by:
getContentLocation in class MultiPartInputStream
- Returns:
- the Content-Location of the stream.
Null if no content-location specified.
getContentId
public String getContentId()
- Return the content id of the stream.
- Specified by:
getContentId in class MultiPartInputStream
- Returns:
- the Content-Location of the stream.
Null if no content-location specified.
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read in class FilterInputStream
- Throws:
IOException
read
public int read()
throws IOException
- Overrides:
read in class FilterInputStream
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class FilterInputStream
- Throws:
IOException
Copyright © The Apache Software Foundation. All Rights Reserved.