Package org.apache.axis.attachments
Class IncomingAttachmentStreams.IncomingAttachmentInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.axis.attachments.IncomingAttachmentStreams.IncomingAttachmentInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- IncomingAttachmentStreams
public final class IncomingAttachmentStreams.IncomingAttachmentInputStream extends java.io.InputStream
-
-
Constructor Summary
Constructors Constructor Description IncomingAttachmentInputStream(java.io.InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHeader(java.lang.String name, java.lang.String value)
Add a header.java.lang.String
getContentId()
java.lang.String
getContentLocation()
java.lang.String
getContentType()
java.lang.String
getHeader(java.lang.String name)
Get a header value.java.util.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()
-
-
-
Method Detail
-
getHeaders
public java.util.Map getHeaders()
- Returns:
- MIME headers for this attachment. May be null if no headers were set.
-
addHeader
public void addHeader(java.lang.String name, java.lang.String value)
Add a header.- Parameters:
name
-value
-
-
getHeader
public java.lang.String getHeader(java.lang.String name)
Get a header value.- Parameters:
name
-- Returns:
- The header found or null if not found.
-
getContentId
public java.lang.String getContentId()
- Returns:
- The header with HTTPConstants.HEADER_CONTENT_ID as the key.
-
getContentLocation
public java.lang.String getContentLocation()
- Returns:
- The header with HTTPConstants.HEADER_CONTENT_LOCATION as the key.
-
getContentType
public java.lang.String getContentType()
- Returns:
- The header with HTTPConstants.HEADER_CONTENT_TYPE as the key.
-
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.- Overrides:
markSupported
in classjava.io.InputStream
-
reset
public void reset() throws java.io.IOException
- Overrides:
reset
in classjava.io.InputStream
- Throws:
java.io.IOException
-
mark
public void mark(int readLimit)
- Overrides:
mark
in classjava.io.InputStream
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
-