Package com.helger.phase4.attachment
Interface IAS4Attachment
- All Known Implementing Classes:
WSS4JAttachment
public interface IAS4Attachment
Read-only interface for an attachment.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault CharsetgetCharsetOrDefault(Charset aDefault) Get the specified character set or the provided default value.com.helger.mail.cte.EContentTransferEncodinggetId()com.helger.commons.io.IHasInputStreamGet the source stream of the attachment using the default resource helper.getSourceStream(AS4ResourceHelper aResourceHelper) Get the source stream of the attachment using the provided resource helper.booleandefault booleandefault boolean
-
Method Details
-
getId
String getId()- Returns:
- The attachment Content ID. Must NOT contain any "cid" prefix.
-
getMimeType
String getMimeType()- Returns:
- The MIME type in a string representation
-
getUncompressedMimeType
- Returns:
- The MIME type of the uncompressed attachment. May be
null.
-
getSourceStream
Get the source stream of the attachment using the default resource helper.- Returns:
- A non-
nullInputStream on the source.
-
getSourceStream
Get the source stream of the attachment using the provided resource helper. This can be helpful, if the source helper is already out of scope.- Parameters:
aResourceHelper- The resource helper to use. May not benull.- Returns:
- A non-
nullInputStream on the source.
-
getInputStreamProvider
-
isRepeatable
default boolean isRepeatable()- Returns:
trueif the input stream backing this attachment can be read multiple times,falseif not.
-
getContentTransferEncoding
- Returns:
- The content transfer encoding to be used. Required for MIME
multipart handling only. May not be
null.
-
getCompressionMode
- Returns:
- The compression mode to use or
nullif the attachment is not compressed.
-
hasCompressionMode
default boolean hasCompressionMode()- Returns:
trueif a compression mode is set,falseif not.
-
getCharset
- Returns:
- The defined character set, falling back to ISO-8859-1 if none is defined.
-
getCharsetOrDefault
Get the specified character set or the provided default value.- Parameters:
aDefault- The default value to be returned, if no character set is provided. May benull.- Returns:
- Only
nullif no character set is defined and the provided default value isnull.
-
hasCharset
boolean hasCharset()- Returns:
trueif a character set is defined,falseif not.
-
customPartProperties
@Nonnull @ReturnsMutableObject com.helger.commons.collection.impl.ICommonsOrderedMap<String,String> customPartProperties()- Returns:
- A non-
nullbut maybe empty map of custom PartInfo/PartProperties for the UserMessage. - Since:
- 0.12.0
-