Interface DataOutputExt

All Superinterfaces:
DataOutput
All Known Implementing Classes:
DataOutputStreamBI, DataOutputStreamLI

public interface DataOutputExt extends DataOutput

Extension of DataOutputStream to support writing unsigned byte, short, int and long values as well as ASCII (0 terminated) strings.

Since:
Jan 10, 2009
  • Method Details

    • writeUnsignedByte

      void writeUnsignedByte(short val) throws IOException
      Writes the lowest significant byte of the given short value as an unsigned byte
      Parameters:
      val -
      Throws:
      IOException
    • writeUnsignedShort

      void writeUnsignedShort(int val) throws IOException
      Writes the 2 lowest significant bytes of the given int value as an unsigned short
      Parameters:
      val -
      Throws:
      IOException
    • writeUnsignedInt

      void writeUnsignedInt(long val) throws IOException
      Writes the 4 lowest significant bytes of the given long value as an unsigned int
      Parameters:
      val -
      Throws:
      IOException
    • writeUnsignedLong

      void writeUnsignedLong(long val) throws IOException
      Writes long value as unsigned.
      Parameters:
      val -
      Throws:
      IOException
    • writeASCII

      void writeASCII(String val) throws IOException
      Writes a 0 terminated ASCII string to stream
      Parameters:
      val -
      Throws:
      IOException
    • flush

      void flush() throws IOException
      Flushes this data output stream. This forces any buffered output bytes to be written out to the stream
      Throws:
      IOException
    • close

      void close() throws IOException
      Flushes and closes the underlying stream
      Throws:
      IOException