Class AS4OutgoingAttachment

java.lang.Object
com.helger.phase4.attachment.AS4OutgoingAttachment

@Immutable public class AS4OutgoingAttachment extends Object
This represents a single payload for an outgoing message.
Since:
0.9.16
Author:
Philip Helger
  • Constructor Details

    • AS4OutgoingAttachment

      protected AS4OutgoingAttachment(@Nullable com.helger.base.array.bytes.ByteArrayWrapper aDataBytes, @Nullable File aDataFile, @Nullable String sContentID, @Nullable String sFilename, @NonNull com.helger.mime.IMimeType aMimeType, @Nullable EAS4CompressionMode eCompressionMode, @Nullable Charset aCharset, @Nullable com.helger.collection.commons.ICommonsOrderedMap<String,String> aCustomProperties)
  • Method Details

    • getDataBytes

      public final @Nullable com.helger.base.array.bytes.ByteArrayWrapper getDataBytes()
      Returns:
      The data to be send as a byte array. May be null in which case getDataFile() has the content.
      Since:
      0.14.0
      See Also:
    • hasDataBytes

      public final boolean hasDataBytes()
      Returns:
      true if the data is available as a byte array, false if it is a file.
      See Also:
    • getDataFile

      public final @Nullable File getDataFile()
      Returns:
      The data to be send as a File. May be null in which case getDataBytes() has the content.
      Since:
      0.14.0
      See Also:
    • hasDataFile

      public final boolean hasDataFile()
      Returns:
      true if the data is available as a File, false if it is a byte array.
      See Also:
    • getContentID

      public final @Nullable String getContentID()
      Returns:
      The Content-ID to be used. May be null.
    • getFilename

      public final @Nullable String getFilename()
      Returns:
      The filename to be used. May be null.
    • getMimeType

      public final @NonNull com.helger.mime.IMimeType getMimeType()
      Returns:
      The MIME type to be used. May not be null.
    • getCompressionMode

      public final @Nullable EAS4CompressionMode getCompressionMode()
      Returns:
      The compression mode to be used. May be null.
    • getCharset

      public final @Nullable Charset getCharset()
      Returns:
      The character set to use. May be null.
      Since:
      0.14.0
    • customProperties

      @ReturnsMutableObject public final @NonNull com.helger.collection.commons.ICommonsOrderedMap<String,String> customProperties()
      Returns:
      All custom properties contained. Never null.
      Since:
      2.8.6
    • getAllCustomProperties

      @ReturnsMutableCopy public final @NonNull com.helger.collection.commons.ICommonsOrderedMap<String,String> getAllCustomProperties()
      Returns:
      All custom properties contained. Never null.
      Since:
      2.8.6
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static @NonNull AS4OutgoingAttachment.Builder builder()
      Create a new builder.
      Returns:
      Never null.