org.apache.axis.attachments
Class MultiPartRelatedInputStream
java.io.FilterInputStream
public class MultiPartRelatedInputStream
This simulates the multipart stream.
- Rick Rineholt
MIME_MULTIPART_RELATED
public static final String MIME_MULTIPART_RELATED
Field MIME_MULTIPART_RELATED
READ_ALL
protected static final String[] READ_ALL
Field READ_ALL
boundary
protected byte[] boundary
Field boundary
cachedSOAPEnvelope
protected java.io.ByteArrayInputStream cachedSOAPEnvelope
Field cachedSOAPEnvelope
closed
protected boolean closed
Field closed
contentId
protected String contentId
Field contentId
contentLocation
protected String contentLocation
Field contentLocation
eos
protected boolean eos
Field eos
log
protected static Log log
Field log
orderedParts
protected java.util.LinkedList orderedParts
Field orderedParts
parts
protected java.util.HashMap parts
Field parts
rootPartLength
protected int rootPartLength
Field rootPartLength
soapStream
protected java.io.InputStream soapStream
Field soapStream
soapStreamBDS
protected java.io.InputStream soapStreamBDS
Field soapStreamBDS
MultiPartRelatedInputStream
public MultiPartRelatedInputStream(String contentType,
java.io.InputStream stream)
throws AxisFault
Create a new Multipart stream.
contentType
- the string that holds the contentTypestream
- the true input stream from where the source
AxisFault
- if the stream could not be created
addPart
protected void addPart(String contentId,
String locationId,
AttachmentPart ap)
Add an AttachmentPart
together with its content and location
IDs.
contentId
- the content IDlocationId
- the location IDap
- the AttachmentPart
available
public int available()
throws java.io.IOException
close
public void close()
throws java.io.IOException
getContentId
public String getContentId()
Return the content id of the stream.
- getContentId in interface MultiPartInputStream
- the Content-Location of the stream.
Null if no content-location specified.
getContentLocation
public String getContentLocation()
Return the content location.
- getContentLocation in interface MultiPartInputStream
- the Content-Location of the stream.
Null if no content-location specified.
read
public int read()
throws java.io.IOException
read
public int read(byte[] b)
throws java.io.IOException
read
public int read(byte[] b,
int off,
int len)
throws java.io.IOException
readAll
protected void readAll()
throws AxisFault
Read all data.
AxisFault
- if there was a problem reading all the
data
readTillFound
protected Part readTillFound(String[] id)
throws AxisFault
This will read streams in till the one that is needed is found.
id
- id is the stream being sought.
- the part for the id
AxisFault
-
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.