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 TypeMethodDescriptionvoidAdd a header.Get a header value.voidmark(int readLimit) booleanDon'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.intread()intread(byte[] b) intread(byte[] b, int off, int len) voidreset()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:
markSupportedin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
mark
public void mark(int readLimit) - Overrides:
markin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-