Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.axis.attachments
Class MultiPartDimeInputStream  view MultiPartDimeInputStream download MultiPartDimeInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.apache.axis.attachments.MultiPartInputStream
              extended byorg.apache.axis.attachments.MultiPartDimeInputStream
All Implemented Interfaces:
java.io.Closeable

public class MultiPartDimeInputStream
extends MultiPartInputStream

This simulates the multipart stream.


Field Summary
protected  byte[] boundary
           
protected  java.io.ByteArrayInputStream cachedSOAPEnvelope
           
protected  boolean closed
           
protected  java.lang.String contentId
           
protected  DimeDelimitedInputStream dimeDelimitedStream
           
protected  boolean eos
           
protected static org.apache.commons.logging.Log log
           
protected  java.util.LinkedList orderedParts
           
protected  java.util.HashMap parts
           
protected static java.lang.String[] READ_ALL
           
protected  int rootPartLength
           
protected  java.io.InputStream soapStream
           
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
MultiPartDimeInputStream(java.io.InputStream is)
          Create a new Multipart stream from an input stream.
 
Method Summary
protected  void addPart(java.lang.String contentId, java.lang.String locationId, AttachmentPart ap)
           
 void close()
          This method closes the input stream by closing the input stream that this object is filtering.
 org.apache.axis.Part getAttachmentByReference(java.lang.String[] id)
           
 java.util.Collection getAttachments()
           
 java.lang.String getContentId()
          Return the content id of the stream.
 java.lang.String getContentLocation()
          Return the content location.
 int read()
          Calls the in.read() method
 int read(byte[] b)
          Calls the read(byte[], int, int) overloaded method.
 int read(byte[] b, int off, int len)
          Calls the in.read(byte[], int, int) method.
protected  void readAll()
           
protected  org.apache.axis.Part readTillFound(java.lang.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, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log

parts

protected java.util.HashMap parts

orderedParts

protected java.util.LinkedList orderedParts

rootPartLength

protected int rootPartLength

closed

protected boolean closed

eos

protected boolean eos

dimeDelimitedStream

protected DimeDelimitedInputStream dimeDelimitedStream

soapStream

protected java.io.InputStream soapStream

boundary

protected byte[] boundary

cachedSOAPEnvelope

protected java.io.ByteArrayInputStream cachedSOAPEnvelope

contentId

protected java.lang.String contentId

READ_ALL

protected static final java.lang.String[] READ_ALL
Constructor Detail

MultiPartDimeInputStream

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

Method Detail

getAttachmentByReference

public org.apache.axis.Part getAttachmentByReference(java.lang.String[] id)
                                              throws org.apache.axis.AxisFault
Specified by:
getAttachmentByReference in class MultiPartInputStream

addPart

protected void addPart(java.lang.String contentId,
                       java.lang.String locationId,
                       AttachmentPart ap)

readAll

protected void readAll()
                throws org.apache.axis.AxisFault

getAttachments

public java.util.Collection getAttachments()
                                    throws org.apache.axis.AxisFault
Specified by:
getAttachments in class MultiPartInputStream

readTillFound

protected org.apache.axis.Part readTillFound(java.lang.String[] id)
                                      throws java.io.IOException
This will read streams in till the one that is needed is found.


getContentLocation

public java.lang.String getContentLocation()
Return the content location.

Specified by:
getContentLocation in class MultiPartInputStream

getContentId

public java.lang.String getContentId()
Return the content id of the stream.

Specified by:
getContentId in class MultiPartInputStream

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.read(byte[], int, int) method.


read

public int read(byte[] b)
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the read(byte[], int, int) overloaded method. Note that this method does not redirect its call directly to a corresponding method in in. This allows subclasses to override only the three argument version of read.


read

public int read()
         throws java.io.IOException
Description copied from class: java.io.FilterInputStream
Calls the in.read() method


close

public void close()
           throws java.io.IOException
Description copied from class: java.io.FilterInputStream
This method closes the input stream by closing the input stream that this object is filtering. Future attempts to access this stream may throw an exception.