Interface ServiceDeskEmailAttachmentMatcher.AttachmentContent

Enclosing interface:
ServiceDeskEmailAttachmentMatcher

@ParametersAreNonnullByDefault @ReturnValuesAreNonnullByDefault public static interface ServiceDeskEmailAttachmentMatcher.AttachmentContent
A simple representation of a mail attachment's actual content, after it has been extracted from a message.

This is designed to provide a immutable representation of the content, so each consumer can decide how they need to access the data.

Since:
v3.10.0
  • Method Details

    • asInputStream

      ByteArrayInputStream asInputStream()
      Return the content as a ByteArrayInputStream for consumption.
      Returns:
      A new input stream object of content data
    • asDataInput

      DataInput asDataInput()
      Return the content as a DataInput for consumption.
      Returns:
      A new data input object of content data
    • contentEquals

      boolean contentEquals(byte[] other)
      Checks that the contents of this attachment are equal to the contents of the given byte source.

      This is a convenience method that may be useful for some implementations.

      Parameters:
      other - The other byte array to compare this attachment content against
      Returns:
      True if the content is equal to other byte[], otherwise False