Class OutlookMessageAttachment.MemoryInputStreamCreator

    • Constructor Summary

      Constructors 
      Constructor Description
      MemoryInputStreamCreator​(java.io.InputStream source)
      Creates a new MemoryInputStreamCreator with the specified source.
    • Constructor Detail

      • MemoryInputStreamCreator

        public MemoryInputStreamCreator​(java.io.InputStream source)
        Creates a new MemoryInputStreamCreator with the specified source.
        Parameters:
        source - The source.
    • Method Detail

      • newInputStream

        public java.io.InputStream newInputStream​(OutlookMessageAttachment omt)
                                           throws java.io.IOException
        Reads a new InputStream with the content of the source. The first time this method is called, the source InputStream will be fully read, closed and stored in-memory. Then, a new ByteArrayInputStream is returned.
        Specified by:
        newInputStream in interface OutlookMessageAttachment.InputStreamCreator
        Parameters:
        omt - The attachment.
        Returns:
        A new ByteArrayInputStream.
        Throws:
        java.io.IOException - If an I/O error occurs.