org.apache.axis.attachments
Class MultiPartRelatedInputStream
java.lang.Object
|
+--java.io.InputStream
|
+--java.io.FilterInputStream
|
+--org.apache.axis.attachments.MultiPartRelatedInputStream
- public class MultiPartRelatedInputStream
- extends java.io.FilterInputStream
This simulates the multipart stream
Fields inherited from class java.io.FilterInputStream |
in |
Methods inherited from class java.io.FilterInputStream |
available, mark, markSupported, reset, skip |
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
MIME_MULTIPART_RELATED
public static final java.lang.String MIME_MULTIPART_RELATED
parts
protected java.util.HashMap parts
orderedParts
protected java.util.LinkedList orderedParts
rootPartLength
protected int rootPartLength
closed
protected boolean closed
eos
protected boolean eos
is
protected java.io.InputStream is
boundaryDelimitedStream
protected BoundaryDelimitedStream boundaryDelimitedStream
soapStream
protected java.io.InputStream soapStream
soapStreamBDS
protected java.io.InputStream soapStreamBDS
boundary
protected byte[] boundary
cachedSOAPEnvelope
protected java.io.ByteArrayInputStream cachedSOAPEnvelope
contentLocation
protected java.lang.String contentLocation
contentId
protected java.lang.String contentId
READ_ALL
protected static final java.lang.String[] READ_ALL
MultiPartRelatedInputStream
public MultiPartRelatedInputStream(java.lang.String contentType,
java.io.InputStream is)
throws AxisFault
- Multipart stream.
- Parameters:
the
- string that holds the contentTypeis
- the true input stream from where the source.
getAttachmentByReference
public Part getAttachmentByReference(java.lang.String[] id)
throws AxisFault
addPart
protected void addPart(java.lang.String contentId,
java.lang.String locationId,
AttachmentPart ap)
readAll
protected void readAll()
throws AxisFault
getAttachments
public java.util.Collection getAttachments()
throws AxisFault
readTillFound
protected Part readTillFound(java.lang.String[] id)
throws AxisFault
- This will read streams in till the one that is needed is found.
- Parameters:
The
- id is the stream being sought. TODO today its only handles CID. all ContentId streams
should be prefixed by "cid:"
getContentLocation
public java.lang.String getContentLocation()
- Return the content location.
- Returns:
- the Content-Location of the stream.
Null if no content-location specified.
getContentId
public java.lang.String getContentId()
- Return the content id of the stream
- Returns:
- the Content-Location of the stream.
Null if no content-location specified.
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
- Read the root stream.
- Overrides:
read
in class java.io.FilterInputStream
read
public int read(byte[] b)
throws java.io.IOException
- Overrides:
read
in class java.io.FilterInputStream
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.FilterInputStream
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.FilterInputStream
Copyright © 2001 Apache XML Project. All Rights Reserved.