Package jminusminus

Class CLOutputStream

All Implemented Interfaces:
Closeable, DataOutput, Flushable, AutoCloseable

class CLOutputStream extends DataOutputStream
Inherits from java.out.DataOutputStream and provides an extra function for writing unsigned int to the output stream, which is required for writing Java class files.
  • Constructor Details

    • CLOutputStream

      public CLOutputStream(OutputStream out)
      Constructs a CLOutputStream from the specified output stream.
      Parameters:
      out - output stream.
  • Method Details

    • writeInt

      public final void writeInt(long v) throws IOException
      Writes four bytes to the output stream to represent the value of the argument. The byte values to be written, in the order shown, are:
           (byte) ( 0xFF & ( v >> 24 ) )
           (byte) ( 0xFF & ( v >> 16 ) )
           (byte) ( 0xFF & ( v >> 8 ) )
           (byte) ( 0xFF & v )
       
      Parameters:
      v - the int value to be written.
      Throws:
      IOException - if an error occurs while writing.