Package 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,AutoCloseable
This simulates the multipart stream.
- Author:
- Rick Rineholt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected ByteArrayInputStreamprotected booleanprotected Stringprotected DimeDelimitedInputStreamprotected booleanprotected static org.apache.commons.logging.Logprotected LinkedListprotected HashMapprotected static final String[]protected intprotected InputStreamFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new Multipart stream from an input stream. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPart(String contentId, String locationId, AttachmentPart ap) voidclose()Return the content id of the stream.Return the content location.intread()intread(byte[] b) intread(byte[] b, int off, int len) protected voidreadAll()protected PartreadTillFound(String[] id) This will read streams in till the one that is needed is found.Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, reset, skipMethods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
log
protected static org.apache.commons.logging.Log log -
parts
-
orderedParts
-
rootPartLength
protected int rootPartLength -
closed
protected boolean closed -
eos
protected boolean eos -
dimeDelimitedStream
-
soapStream
-
boundary
protected byte[] boundary -
cachedSOAPEnvelope
-
contentId
-
READ_ALL
-
-
Constructor Details
-
MultiPartDimeInputStream
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
-
-
Method Details
-
getAttachmentByReference
- Specified by:
getAttachmentByReferencein classMultiPartInputStream- Throws:
AxisFault
-
addPart
-
readAll
- Throws:
AxisFault
-
getAttachments
- Specified by:
getAttachmentsin classMultiPartInputStream- Throws:
AxisFault
-
readTillFound
This will read streams in till the one that is needed is found.- Parameters:
id- is the stream being sought- Returns:
- a
Partmatching the ids - Throws:
IOException
-
getContentLocation
Return the content location.- Specified by:
getContentLocationin classMultiPartInputStream- Returns:
- the Content-Location of the stream. Null if no content-location specified.
-
getContentId
Return the content id of the stream.- Specified by:
getContentIdin classMultiPartInputStream- Returns:
- the Content-Location of the stream. Null if no content-location specified.
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
read
- Overrides:
readin classFilterInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterInputStream- Throws:
IOException
-