Package org.apache.axiom.attachments
Class IncomingAttachmentInputStream
java.lang.Object
java.io.InputStream
org.apache.axiom.attachments.IncomingAttachmentInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIncomingAttachmentInputStream
(InputStream in, IncomingAttachmentStreams parentContainer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a header.Get a header value.void
mark
(int readLimit) boolean
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()
Methods inherited from class java.io.InputStream
available, close, nullInputStream, readAllBytes, readNBytes, readNBytes, skip, transferTo
-
Field Details
-
HEADER_CONTENT_DESCRIPTION
- See Also:
-
HEADER_CONTENT_TYPE
- See Also:
-
HEADER_CONTENT_TRANSFER_ENCODING
- See Also:
-
HEADER_CONTENT_LENGTH
- See Also:
-
HEADER_CONTENT_LOCATION
- See Also:
-
HEADER_CONTENT_ID
- See Also:
-
-
Constructor Details
-
IncomingAttachmentInputStream
- Parameters:
in
-
-
-
Method Details
-
getHeaders
- Returns:
- MIME headers for this attachment. May be null if no headers were set.
-
addHeader
Add a header.- Parameters:
name
-value
-
-
getHeader
Get a header value.- Parameters:
name
-- Returns:
- The header found or null if not found.
-
getContentId
- Returns:
- The header with HTTPConstants.HEADER_CONTENT_ID as the key.
-
getContentLocation
- Returns:
- The header with HTTPConstants.HEADER_CONTENT_LOCATION as the key.
-
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 classInputStream
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
mark
public void mark(int readLimit) - Overrides:
mark
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-