Package herddb.utils
Class ExtendedDataOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.DataOutputStream
-
- herddb.utils.ExtendedDataOutputStream
-
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
public final class ExtendedDataOutputStream extends DataOutputStream
Extended version of DataInputStream- Author:
- enrico.olivelli, diego.salvi
- See Also:
ExtendedDataInputStream
-
-
Field Summary
Fields Modifier and Type Field Description static ExtendedDataOutputStreamNULL-
Fields inherited from class java.io.DataOutputStream
written
-
Fields inherited from class java.io.FilterOutputStream
out
-
-
Constructor Summary
Constructors Constructor Description ExtendedDataOutputStream(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteArray(byte[] data)voidwriteArray(byte[] data, int offset, int len)voidwriteArray(Bytes data)voidwriteFloatArray(float[] data)voidwriteNullArray()voidwriteNullFloatArray()voidwriteVInt(int i)Writes an int in a variable-length format.voidwriteVLong(long i)Writes a long in a variable-length format.voidwriteZInt(int i)voidwriteZLong(long l)-
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class java.io.FilterOutputStream
close, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataOutput
write
-
-
-
-
Field Detail
-
NULL
public static final ExtendedDataOutputStream NULL
-
-
Constructor Detail
-
ExtendedDataOutputStream
public ExtendedDataOutputStream(OutputStream out)
-
-
Method Detail
-
writeVInt
public void writeVInt(int i) throws IOExceptionWrites an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes.- Parameters:
i-- Throws:
IOException
-
writeVLong
public void writeVLong(long i) throws IOExceptionWrites a long in a variable-length format. Writes between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.- Parameters:
i-- Throws:
IOException
-
writeZInt
public void writeZInt(int i) throws IOException- Throws:
IOException
-
writeZLong
public void writeZLong(long l) throws IOException- Throws:
IOException
-
writeArray
public void writeArray(Bytes data) throws IOException
- Throws:
IOException
-
writeNullArray
public void writeNullArray() throws IOException- Throws:
IOException
-
writeNullFloatArray
public void writeNullFloatArray() throws IOException- Throws:
IOException
-
writeArray
public void writeArray(byte[] data) throws IOException- Throws:
IOException
-
writeFloatArray
public void writeFloatArray(float[] data) throws IOException- Throws:
IOException
-
writeArray
public void writeArray(byte[] data, int offset, int len) throws IOException- Throws:
IOException
-
-