org.apache.axis.attachments

Class IncomingAttachmentStreams.IncomingAttachmentInputStream

Enclosing Class:
IncomingAttachmentStreams

public final class IncomingAttachmentStreams.IncomingAttachmentInputStream
extends InputStream

Constructor Summary

IncomingAttachmentInputStream(InputStream in)

Method Summary

void
addHeader(String name, String value)
Add a header.
String
getContentId()
String
getContentLocation()
String
getContentType()
String
getHeader(String name)
Get a header value.
Map
getHeaders()
void
mark(int readLimit)
boolean
markSupported()
Don't want to support mark and reset since this may get us into concurrency problem when different pieces of software may have a handle to the underlying InputStream.
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
void
reset()

Constructor Details

IncomingAttachmentInputStream

public IncomingAttachmentInputStream(InputStream in)
Parameters:
in -

Method Details

addHeader

public void addHeader(String name,
                      String value)
Add a header.
Parameters:
name -
value -

getContentId

public String getContentId()
Returns:
The header with HTTPConstants.HEADER_CONTENT_ID as the key.

getContentLocation

public String getContentLocation()
Returns:
The header with HTTPConstants.HEADER_CONTENT_LOCATION as the key.

getContentType

public String getContentType()
Returns:
The header with HTTPConstants.HEADER_CONTENT_TYPE as the key.

getHeader

public String getHeader(String name)
Get a header value.
Parameters:
name -
Returns:
The header found or null if not found.

getHeaders

public Map getHeaders()
Returns:
MIME headers for this attachment. May be null if no headers were set.

mark

public void mark(int readLimit)

markSupported

public boolean markSupported()
Don't want to support mark and reset since this may get us into concurrency problem when different pieces of software may have a handle to the underlying InputStream.

read

public int read()
            throws IOException

read

public int read(byte[] b)
            throws IOException

read

public int read(byte[] b,
                int off,
                int len)
            throws IOException

reset

public void reset()
            throws IOException

Copyright © 2005 Apache Web Services Project. All Rights Reserved.