Package io.pravega.common.io
Interface DirectDataOutput
-
- All Known Subinterfaces:
RandomAccessOutputStream,RevisionDataOutput
- All Known Implementing Classes:
ByteBufferOutputStream
public interface DirectDataOutputDefines an object meant for serializing data (usually anOutputStream) that can write various inputs more efficiently than otherwise (i.e., byte-by-byte copy).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidwriteBuffer(BufferView buffer)Includes the givenBufferView.voidwriteInt(int intValue)Writes the given value as a 32 bit Integer.voidwriteLong(long longValue)Writes the given value as a 64 bit Long.voidwriteShort(int shortValue)Writes the given value as a 16 bit Short.
-
-
-
Method Detail
-
writeBuffer
void writeBuffer(BufferView buffer) throws java.io.IOException
Includes the givenBufferView.- Parameters:
buffer- TheBufferViewto include.- Throws:
java.io.IOException- If an IO Exception occurred.
-
writeShort
void writeShort(int shortValue) throws java.io.IOExceptionWrites the given value as a 16 bit Short. Every effort will be made to write this using efficient techniques (such as making use of intrinsic instructions).- Parameters:
shortValue- The Short value to write.- Throws:
java.io.IOException- If an IO Exception occurred.
-
writeInt
void writeInt(int intValue) throws java.io.IOExceptionWrites the given value as a 32 bit Integer. Every effort will be made to write this using efficient techniques (such as making use of intrinsic instructions).- Parameters:
intValue- The Integer value to write.- Throws:
java.io.IOException- If an IO Exception occurred.
-
writeLong
void writeLong(long longValue) throws java.io.IOExceptionWrites the given value as a 64 bit Long. Every effort will be made to write this using efficient techniques (such as making use of intrinsic instructions).- Parameters:
longValue- The Long value to write.- Throws:
java.io.IOException- If an IO Exception occurred.
-
-