Package dev.gmitch215.bytebox.io
Interface SerialSink
public interface SerialSink
Where a codec writes one object's field values.
Implemented by the writer and called by generated code. The order of the calls is the order of the bytes, and the generator emits them in the order the format fixes, so nothing here decides layout.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidwriteBoolean(boolean value) voidwriteByte(byte value) voidwriteChar(char value) voidwriteDouble(double value) voidwriteFloat(float value) voidwriteInt(int value) voidwriteLong(long value) voidwriteObject(Object value) Writes a reference:null, a string, a boxed primitive, an array, an enum constant, or another type with a codec.voidwriteShort(short value)
-
Method Details
-
writeBoolean
void writeBoolean(boolean value) - Parameters:
value- the value
-
writeByte
void writeByte(byte value) - Parameters:
value- the value
-
writeChar
void writeChar(char value) - Parameters:
value- the value
-
writeShort
void writeShort(short value) - Parameters:
value- the value
-
writeInt
void writeInt(int value) - Parameters:
value- the value
-
writeLong
void writeLong(long value) - Parameters:
value- the value
-
writeFloat
void writeFloat(float value) - Parameters:
value- the value
-
writeDouble
void writeDouble(double value) - Parameters:
value- the value
-
writeObject
Writes a reference:null, a string, a boxed primitive, an array, an enum constant, or another type with a codec.An object already written in this stream is written as a reference to it, so a graph that shares or cycles comes back sharing and cycling.
- Parameters:
value- the value, which may benull
-