Package org.jacoco.core.internal.data
Class CompactDataOutput
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.DataOutputStream
org.jacoco.core.internal.data.CompactDataOutput
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
Additional data output methods for compact storage of data structures.
- See Also:
-
Field Summary
Fields inherited from class java.io.DataOutputStream
writtenFields inherited from class java.io.FilterOutputStream
out -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newCompactDataOutputinstance that writes data to the specified underlying output stream -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteBooleanArray(boolean[] value) Writes a boolean array.voidwriteVarInt(int value) Writes a variable length representation of an integer value that reduces the number of written bytes for small positive values.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
-
CompactDataOutput
Creates a newCompactDataOutputinstance that writes data to the specified underlying output stream- Parameters:
out- underlying output stream
-
-
Method Details
-
writeVarInt
Writes a variable length representation of an integer value that reduces the number of written bytes for small positive values. Depending on the given value 1 to 5 bytes will be written to the underlying stream.- Parameters:
value- value to write- Throws:
IOException- if thrown by the underlying stream
-
writeBooleanArray
Writes a boolean array. Internally a sequence of boolean values is packed into single bits.- Parameters:
value- boolean array- Throws:
IOException- if thrown by the underlying stream
-