Class Attachment

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ListenableFuture<java.io.InputStream> fetchDataAsync()
      Fetches the content of this attachment.
      java.lang.String getContentType()
      Gets the content type of this attachment.
      long getId()
      Gets the id of this attachment.
      java.lang.String getName()
      Gets the name of this attachment.
      long getSize()
      Gets the size, in bytes, of this attachment.
      boolean hasFetchedData()
      Gets whether the content of this attachment has been fetched.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • hasFetchedData

        public boolean hasFetchedData()
        Gets whether the content of this attachment has been fetched. If not fetched, it can be fetched explicitly by calling fetchDataAsync.
        Returns:
        true if the content of the attachment has been fetched; otherwise false.
        Since:
        100.0.0
      • getId

        public long getId()
        Gets the id of this attachment.
        Returns:
        the id of this attachment
        Since:
        100.1.0
      • getContentType

        public java.lang.String getContentType()
        Gets the content type of this attachment. Valid types depend on the service associated with this feature. Examples include "text/plain", "image/jpg", "application/pdf", and so on.
        Returns:
        the content type of this attachment. May be null
        Since:
        100.0.0
      • getName

        public java.lang.String getName()
        Gets the name of this attachment.
        Returns:
        the name of this attachment. May be null
        Since:
        100.0.0
      • getSize

        public long getSize()
        Gets the size, in bytes, of this attachment.
        Returns:
        the size, in bytes, of this attachment
        Since:
        100.0.0
      • fetchDataAsync

        public ListenableFuture<java.io.InputStream> fetchDataAsync()
        Fetches the content of this attachment.
        Returns:
        a ListenableFuture containing the content of this attachment as an InputStream upon successful completion of the asynchronous operation
        Since:
        100.0.0