Class XORInputStream

All Implemented Interfaces:
Closeable, AutoCloseable

public class XORInputStream extends DelegatingInputStream
Author:
Eike Stepper
  • Constructor Details

    • XORInputStream

      public XORInputStream(InputStream in, int... key)
  • Method Details

    • getKey

      public int[] getKey()
    • read

      public int read() throws IOException
      Description copied from class: DelegatingInputStream
      Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

      This method simply performs in.read() and returns the result.

      Overrides:
      read in class DelegatingInputStream
      Returns:
      the next byte of data, or -1 if the end of the stream is reached.
      Throws:
      IOException - if an I/O error occurs.
      See Also: