Package org.jboss.classfilewriter.util
Class ByteArrayDataOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
org.jboss.classfilewriter.util.ByteArrayDataOutputStream
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
DataOutputStream sub class that allows for the lazy writing of length values.
These length values are inserted into the bytes when then final bytes are read.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteArrayOutputStreamprivate final List<ByteArrayDataOutputStream.LazySizeImpl> Fields inherited from class java.io.DataOutputStream
writtenFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()private voidoverwriteInt(byte[] bytecode, int offset, int value) overwrites a 32 bit value in the already written bytecode dataMethods 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
-
Field Details
-
bytes
-
sizes
-
-
Constructor Details
-
ByteArrayDataOutputStream
-
ByteArrayDataOutputStream
public ByteArrayDataOutputStream()
-
-
Method Details
-
writeSize
- Throws:
IOException
-
getBytes
public byte[] getBytes() -
overwriteInt
private void overwriteInt(byte[] bytecode, int offset, int value) overwrites a 32 bit value in the already written bytecode data
-