Class ExposedDataOutputStream

All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable

public class ExposedDataOutputStream extends DataOutputStream
Version:
$Id: ExposedDataOutputStream.java,v 1.2.4.1 2008/10/28 09:32:36 belaban Exp $
Author:
Bela Ban
  • Constructor Details

    • ExposedDataOutputStream

      public ExposedDataOutputStream(OutputStream out)
      Creates a new data output stream to write data to the specified underlying output stream. The counter written is set to zero.
      Parameters:
      out - the underlying output stream, to be saved for later use.
      See Also:
  • Method Details

    • reset

      public void reset()
    • getOutputStream

      public OutputStream getOutputStream()
    • write

      public void write(int b) throws IOException
      Writes the specified byte (the low eight bits of the argument b) to the underlying output stream. If no exception is thrown, the counter written is incremented by 1.

      Implements the write method of OutputStream.

      Specified by:
      write in interface DataOutput
      Overrides:
      write in class DataOutputStream
      Parameters:
      b - the byte to be written.
      Throws:
      IOException - if an I/O error occurs.
      See Also:
    • write

      public void write(byte[] b, int off, int len) throws IOException
      Writes len bytes from the specified byte array starting at offset off to the underlying output stream. If no exception is thrown, the counter written is incremented by len.
      Specified by:
      write in interface DataOutput
      Overrides:
      write in class DataOutputStream
      Parameters:
      b - the data.
      off - the start offset in the data.
      len - the number of bytes to write.
      Throws:
      IOException - if an I/O error occurs.
      See Also: