Class InMemoryMultiPassStrategy

  • All Implemented Interfaces:
    MultiPassStrategy

    public class InMemoryMultiPassStrategy
    extends java.lang.Object
    implements MultiPassStrategy
    Implementation of the MultiPassStrategy. This class keeps the read data in memory by caching the data inside a ByteArrayOutputStream. Note, that this class is suitable and efficient for processing small amounts of data. For larger data like encrypted files, use of the WriteToFileMultiPassStrategy is recommended to prevent OutOfMemoryErrors and other issues.
    • Constructor Detail

      • InMemoryMultiPassStrategy

        public InMemoryMultiPassStrategy()
    • Method Detail

      • getMessageOutputStream

        public java.io.ByteArrayOutputStream getMessageOutputStream()
        Description copied from interface: MultiPassStrategy
        Provide an OutputStream into which the signed data can be read into.
        Specified by:
        getMessageOutputStream in interface MultiPassStrategy
        Returns:
        output stream
      • getBytes

        public byte[] getBytes()