Class AppendLayer

  • All Implemented Interfaces:
    Runnable, Layer

    public class AppendLayer
    extends AbstractBasicLayer
    Append the bytes from a file to the current byte stream. On decryption just strip it from the byte stream.

    SPDX-License-Identifier: MIT

    Author:
    Kai Kretschmann
    • Constructor Detail

      • AppendLayer

        public AppendLayer()
        Constructor of FilemergeLayer.
    • Method Detail

      • init

        public final void init​(String data)
        init function.
        Parameters:
        data - to initialise the file.
      • encStream

        public void encStream​(InputStream inputStream,
                              OutputStream outputStream)
                       throws JastacryException
        Encode data.
        Parameters:
        inputStream - existing and opened input stream
        outputStream - existing and opened output stream
        Throws:
        JastacryException - if one of the streams fail
      • decStream

        public void decStream​(InputStream inputStream,
                              OutputStream outputStream)
                       throws JastacryException
        Decode back.
        Parameters:
        inputStream - existing and opened input stream
        outputStream - existing and opened output stream
        Throws:
        JastacryException - if one of the streams fail
      • equals

        public boolean equals​(Object o)
        Override equals method from object class.
        Overrides:
        equals in class Object
        Parameters:
        o - object to compare with
        Returns:
        true or false
      • hashCode

        public int hashCode()
        Override equals method from object class.
        Overrides:
        hashCode in class Object
        Returns:
        hash of properties