Class TeeInputStream

java.lang.Object
java.io.InputStream
org.bouncycastle.util.io.TeeInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public class TeeInputStream
extends InputStream
  • Constructor Details

  • Method Details

    • read

      public int read​(byte[] buf) throws IOException
      Description copied from class: InputStream
      Equivalent to read(buffer, 0, buffer.length).
      Overrides:
      read in class InputStream
      Throws:
      IOException
    • read

      public int read​(byte[] buf, int off, int len) throws IOException
      Description copied from class: InputStream
      Reads up to byteCount bytes from this stream and stores them in the byte array buffer starting at byteOffset. Returns the number of bytes actually read or -1 if the end of the stream has been reached.
      Overrides:
      read in class InputStream
      Throws:
      IOException - if the stream is closed or another IOException occurs.
    • read

      public int read() throws IOException
      Description copied from class: InputStream
      Reads a single byte from this stream and returns it as an integer in the range from 0 to 255. Returns -1 if the end of the stream has been reached. Blocks until one byte has been read, the end of the source stream is detected or an exception is thrown.
      Specified by:
      read in class InputStream
      Throws:
      IOException - if the stream is closed or another IOException occurs.
    • close

      public void close() throws IOException
      Description copied from class: InputStream
      Closes this stream. Concrete implementations of this class should free any resources during close. This implementation does nothing.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class InputStream
      Throws:
      IOException - if an error occurs while closing this stream.
    • getOutputStream

      public OutputStream getOutputStream()