Class TeeOutputStream

java.lang.Object
java.io.OutputStream
org.bouncycastle.util.io.TeeOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class TeeOutputStream
extends OutputStream
  • Constructor Details

  • Method Details

    • write

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

      public void write​(byte[] buf, int off, int len) throws IOException
      Description copied from class: OutputStream
      Writes count bytes from the byte array buffer starting at position offset to this stream.
      Overrides:
      write in class OutputStream
      Parameters:
      buf - the buffer to be written.
      off - the start position in buffer from where to get bytes.
      len - the number of bytes from buffer to write to this stream.
      Throws:
      IOException - if an error occurs while writing to this stream.
    • write

      public void write​(int b) throws IOException
      Description copied from class: OutputStream
      Writes a single byte to this stream. Only the least significant byte of the integer oneByte is written to the stream.
      Specified by:
      write in class OutputStream
      Parameters:
      b - the byte to be written.
      Throws:
      IOException - if an error occurs while writing to this stream.
    • flush

      public void flush() throws IOException
      Description copied from class: OutputStream
      Flushes this stream. Implementations of this method should ensure that any buffered data is written out. This implementation does nothing.
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException - if an error occurs while flushing this stream.
    • close

      public void close() throws IOException
      Description copied from class: OutputStream
      Closes this stream. Implementations of this method should free any resources used by the stream. This implementation does nothing.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException - if an error occurs while closing this stream.