Class UninterruptibleOutputStream

java.lang.Object
java.io.OutputStream
org.jboss.logmanager.handlers.UninterruptibleOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public final class UninterruptibleOutputStream extends OutputStream
An output stream which is not interruptible.
  • Field Details

  • Constructor Details

    • UninterruptibleOutputStream

      public UninterruptibleOutputStream(OutputStream out)
      Construct a new instance.
      Parameters:
      out - the delegate stream
  • Method Details

    • write

      public void write(int b) throws IOException
      Write the given byte uninterruptibly.
      Specified by:
      write in class OutputStream
      Parameters:
      b - the byte to write
      Throws:
      IOException - if an error occurs
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Write the given bytes uninterruptibly.
      Overrides:
      write in class OutputStream
      Parameters:
      b - the bytes to write
      off - the offset into the array
      len - the length of the array to write
      Throws:
      IOException - if an error occurs
    • flush

      public void flush() throws IOException
      Flush the stream uninterruptibly.
      Specified by:
      flush in interface Flushable
      Overrides:
      flush in class OutputStream
      Throws:
      IOException - if an error occurs
    • close

      public void close() throws IOException
      Close the stream uninterruptibly.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class OutputStream
      Throws:
      IOException - if an error occurs
    • toString

      public String toString()
      Get the string representation of this stream.
      Overrides:
      toString in class Object
      Returns:
      the string