站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 jaxrpc API Documentation 英文版文档

MultiPartRelatedInputStream (JAXRPC API) - JBoss 3.2.7 jaxrpc API Documentation 英文版文档


org.apache.axis.attachments
Class MultiPartRelatedInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byorg.apache.axis.attachments.MultiPartInputStream
              extended byorg.apache.axis.attachments.MultiPartRelatedInputStream

public class MultiPartRelatedInputStream
extends MultiPartInputStream

This simulates the multipart stream

Author:
Rick Rineholt

Field Summary
protected  byte[] boundary
          Field boundary
protected  BoundaryDelimitedStream boundaryDelimitedStream
          Field boundaryDelimitedStream
protected  ByteArrayInputStream cachedSOAPEnvelope
          Field cachedSOAPEnvelope
protected  boolean closed
          Field closed
protected  String contentId
          Field contentId
protected  String contentLocation
          Field contentLocation
protected  boolean eos
          Field eos
static String MIME_MULTIPART_RELATED
          Field MIME_MULTIPART_RELATED
protected  LinkedList orderedParts
          Field orderedParts
protected  HashMap parts
          Field parts
protected static String[] READ_ALL
          Field READ_ALL
protected  int rootPartLength
          Field rootPartLength
protected  InputStream soapStream
          Field soapStream
protected  InputStream soapStreamBDS
          Field soapStreamBDS
 
Fields inherited from class java.io.FilterInputStream
in
 
Constructor Summary
MultiPartRelatedInputStream(String contentType, InputStream stream)
          Multipart stream.
 
Method Summary
protected  void addPart(String contentId, String locationId, AttachmentPartImpl ap)
          Method addPart
 void close()
          Method close
 Part getAttachmentByReference(String[] id)
          Method getAttachmentByReference
 Collection getAttachments()
          Method getAttachments
 String getContentId()
          Return the content id of the stream
 String getContentLocation()
          Return the content location.
 int read()
          Method read
 int read(byte[] b)
          Method read
 int read(byte[] b, int off, int len)
          Read the root stream.
protected  void readAll()
          Method readAll
protected  Part readTillFound(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

MIME_MULTIPART_RELATED

public static final String MIME_MULTIPART_RELATED
Field MIME_MULTIPART_RELATED

See Also:
Constant Field Values

parts

protected HashMap parts
Field parts


orderedParts

protected LinkedList orderedParts
Field orderedParts


rootPartLength

protected int rootPartLength
Field rootPartLength


closed

protected boolean closed
Field closed


eos

protected boolean eos
Field eos


boundaryDelimitedStream

protected BoundaryDelimitedStream boundaryDelimitedStream
Field boundaryDelimitedStream


soapStream

protected InputStream soapStream
Field soapStream


soapStreamBDS

protected InputStream soapStreamBDS
Field soapStreamBDS


boundary

protected byte[] boundary
Field boundary


cachedSOAPEnvelope

protected ByteArrayInputStream cachedSOAPEnvelope
Field cachedSOAPEnvelope


contentLocation

protected String contentLocation
Field contentLocation


contentId

protected String contentId
Field contentId


READ_ALL

protected static final String[] READ_ALL
Field READ_ALL

Constructor Detail

MultiPartRelatedInputStream

public MultiPartRelatedInputStream(String contentType,
                                   InputStream stream)
                            throws AxisFault
Multipart stream.

Parameters:
contentType - the string that holds the contentType
stream - is the true input stream from where the source.
Throws:
AxisFault
Method Detail

getAttachmentByReference

public Part getAttachmentByReference(String[] id)
                              throws AxisFault
Method getAttachmentByReference

Specified by:
getAttachmentByReference in class MultiPartInputStream
Parameters:
id -
Returns:
the attachment Part
Throws:
AxisFault

addPart

protected void addPart(String contentId,
                       String locationId,
                       AttachmentPartImpl ap)
Method addPart

Parameters:
contentId -
locationId -
ap -

readAll

protected void readAll()
                throws AxisFault
Method readAll

Throws:
AxisFault

getAttachments

public Collection getAttachments()
                          throws AxisFault
Method getAttachments

Specified by:
getAttachments in class MultiPartInputStream
Returns:
the collection of attachments
Throws:
AxisFault

readTillFound

protected Part readTillFound(String[] id)
                      throws AxisFault
This will read streams in till the one that is needed is found.

Parameters:
id - id is the stream being sought.
Returns:
the part for the id
Throws:
AxisFault

getContentLocation

public String getContentLocation()
Return the content location.

Specified by:
getContentLocation in class MultiPartInputStream
Returns:
the Content-Location of the stream. Null if no content-location specified.

getContentId

public String getContentId()
Return the content id of the stream

Specified by:
getContentId in class MultiPartInputStream
Returns:
the Content-Location of the stream. Null if no content-location specified.

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Read the root stream.

Parameters:
b -
off -
len -
Returns:
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Method read

Parameters:
b -
Returns:
Throws:
IOException

read

public int read()
         throws IOException
Method read

Returns:
Throws:
IOException

close

public void close()
           throws IOException
Method close

Throws:
IOException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.