Interface IAttachmentLazyDataSource

All Known Implementing Classes:
AttachmentDBLazyDataSource, AttachmentFileLazyDataSource

public interface IAttachmentLazyDataSource
IDEMPIERE-4889 interface for lazy loading of attachment content
Author:
Carlos Ruiz - globalqss
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Clean up resources held
    byte[]
    Return a byte array containing the data from the Attachment Entry Usually the implementing class must have a constructor with the variable(s) required for loading later the data
    Get file attachment
    Get input stream for attachment entry
    long
    Get size of attachment entry
  • Method Details

    • getData

      byte[] getData()
      Return a byte array containing the data from the Attachment Entry Usually the implementing class must have a constructor with the variable(s) required for loading later the data
      Returns:
      byte[] attachment content
    • getInputStream

      InputStream getInputStream()
      Get input stream for attachment entry
      Returns:
      input stream
    • getSize

      long getSize()
      Get size of attachment entry
      Returns:
      size
    • getFile

      File getFile()
      Get file attachment
      Returns:
      file attachment or null
    • cleanUp

      default void cleanUp()
      Clean up resources held