org.apache.axis.attachments

Class MultiPartDimeInputStream


public class MultiPartDimeInputStream
extends MultiPartInputStream

This simulates the multipart stream.

Author:
Rick Rineholt

Field Summary

protected static String[]
READ_ALL
protected byte[]
boundary
protected java.io.ByteArrayInputStream
cachedSOAPEnvelope
protected boolean
closed
protected String
contentId
protected DimeDelimitedInputStream
dimeDelimitedStream
protected boolean
eos
protected static Log
log
protected java.util.LinkedList
orderedParts
protected java.util.HashMap
parts
protected int
rootPartLength
protected java.io.InputStream
soapStream

Constructor Summary

MultiPartDimeInputStream(java.io.InputStream is)
Create a new Multipart stream from an input stream.

Method Summary

protected void
addPart(String contentId, String locationId, AttachmentPart ap)
void
close()
Part
getAttachmentByReference(String[] id)
java.util.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.

Methods inherited from class org.apache.axis.attachments.MultiPartInputStream

getAttachmentByReference, getAttachments, getContentId, getContentLocation

Field Details

READ_ALL

protected static final String[] READ_ALL


boundary

protected byte[] boundary


cachedSOAPEnvelope

protected java.io.ByteArrayInputStream cachedSOAPEnvelope


closed

protected boolean closed


contentId

protected String contentId


dimeDelimitedStream

protected DimeDelimitedInputStream dimeDelimitedStream


eos

protected boolean eos


log

protected static Log log


orderedParts

protected java.util.LinkedList orderedParts


parts

protected java.util.HashMap parts


rootPartLength

protected int rootPartLength


soapStream

protected java.io.InputStream soapStream

Constructor Details

MultiPartDimeInputStream

public MultiPartDimeInputStream(java.io.InputStream is)
            throws java.io.IOException
Create a new Multipart stream from an input stream.

Parameters:
is - the true input stream that is read from

Method Details

addPart

protected void addPart(String contentId,
                       String locationId,
                       AttachmentPart ap)


close

public void close()
            throws java.io.IOException


getAttachmentByReference

public Part getAttachmentByReference(String[] id)
            throws AxisFault
Overrides:
getAttachmentByReference in interface MultiPartInputStream


getAttachments

public java.util.Collection getAttachments()
            throws AxisFault
Overrides:
getAttachments in interface MultiPartInputStream


getContentId

public String getContentId()
Return the content id of the stream.
Overrides:
getContentId in interface MultiPartInputStream

Returns:
the Content-Location of the stream. Null if no content-location specified.


getContentLocation

public String getContentLocation()
Return the content location.
Overrides:
getContentLocation in interface MultiPartInputStream

Returns:
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


readTillFound

protected Part readTillFound(String[] id)
            throws java.io.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


Copyright B) 2005 Apache Web Services Project. All Rights Reserved.