Package jminusminus
Class CLOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
jminusminus.CLOutputStream
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
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.
-
Field Summary
Fields inherited from class java.io.DataOutputStream
writtenFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a CLOutputStream from the specified output stream. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidwriteInt(long v) Writes four bytes to the output stream to represent the value of the argument.Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTFMethods inherited from class java.io.FilterOutputStream
close, writeMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.io.DataOutput
write
-
Constructor Details
-
CLOutputStream
Constructs a CLOutputStream from the specified output stream.- Parameters:
out- output stream.
-
-
Method Details
-
writeInt
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.
-