Package io.aether.utils.dataio
Interface DataOut
-
- All Known Subinterfaces:
DataIO
- All Known Implementing Classes:
ByteBufferDataIO,DataInOut,DataInOutStatic
public interface DataOut
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclear()Clears this output stream.default intgetSizeForWrite()Returns the size of this output stream for writing, in bytes.default booleanisWritable()Returns whether this output stream is writable or not.default voidwrite(byte[] b)Writes a byte array to this output stream and returns the number of bytes actually written.default intwrite(byte[] b, int off, int len)Writes a byte array to this output stream and returns the number of bytes actually written.default voidwrite(int[] b)Writes an integer array to this output stream and returns the number of integers actually written.default intwrite(int[] b, int off, int len)Writes an integer array to this output stream and returns the number of integers actually written.default voidwrite(DataIn data)Writes a data input stream to this output stream.default voidwrite(DataInOut data)Writes a data input stream to this output stream.default voidwrite(DataInOutStatic data)Writes a static data input stream to this output stream.default voidwriteBoolean(boolean v)Writes a boolean value to this output stream.voidwriteByte(int v)Writes a byte value to this output stream.default voidwriteChar(char v)Writes a character value to this output stream.default voidwriteDouble(double v)Writes a double value to this output stream.default voidwriteFloat(float v)Writes a float value to this output stream.default voidwriteHexBytes(java.lang.String hex)Writes a string to this output stream as hexadecimal bytes.default voidwriteInt(int v)Writes an integer value to this output stream.default voidwriteLong(long v)Writes a long value to this output stream.default voidwriteShort(int v)default voidwriteShort(short v)Writes a short value to this output stream.
-
-
-
Method Detail
-
write
default void write(byte[] b)
Writes a byte array to this output stream and returns the number of bytes actually written.- Parameters:
b- The byte array to write from.
-
write
default void write(int[] b)
Writes an integer array to this output stream and returns the number of integers actually written.- Parameters:
b- The integer array to write from.
-
write
default int write(byte[] b, int off, int len)Writes a byte array to this output stream and returns the number of bytes actually written.- Parameters:
b- The byte array to write from.off- The starting position in the array to read from.len- The maximum number of bytes to write.
-
write
default int write(int[] b, int off, int len)Writes an integer array to this output stream and returns the number of integers actually written.- Parameters:
b- The integer array to write from.off- The starting position in the array to read from.len- The maximum number of integers to write.
-
clear
default void clear()
Clears this output stream.
-
writeBoolean
default void writeBoolean(boolean v)
Writes a boolean value to this output stream.- Parameters:
v- The boolean value to write.
-
writeByte
void writeByte(int v)
Writes a byte value to this output stream.- Parameters:
v- The byte value to write.
-
writeShort
default void writeShort(int v)
-
writeShort
default void writeShort(short v)
Writes a short value to this output stream.- Parameters:
v- The short value to write.
-
writeChar
default void writeChar(char v)
Writes a character value to this output stream.- Parameters:
v- The character value to write.
-
writeInt
default void writeInt(int v)
Writes an integer value to this output stream.- Parameters:
v- The integer value to write.
-
writeLong
default void writeLong(long v)
Writes a long value to this output stream.- Parameters:
v- The long value to write.
-
writeFloat
default void writeFloat(float v)
Writes a float value to this output stream.- Parameters:
v- The float value to write.
-
writeDouble
default void writeDouble(double v)
Writes a double value to this output stream.- Parameters:
v- The double value to write.
-
isWritable
default boolean isWritable()
Returns whether this output stream is writable or not.
-
getSizeForWrite
default int getSizeForWrite()
Returns the size of this output stream for writing, in bytes.
-
writeHexBytes
default void writeHexBytes(java.lang.String hex)
Writes a string to this output stream as hexadecimal bytes.- Parameters:
hex- The string to write as hexadecimal bytes.
-
write
default void write(DataInOut data)
Writes a data input stream to this output stream.- Parameters:
data- The data input stream to write.
-
write
default void write(DataInOutStatic data)
Writes a static data input stream to this output stream.- Parameters:
data- The static data input stream to write.
-
write
default void write(DataIn data)
Writes a data input stream to this output stream.- Parameters:
data- The data input stream to write.
-
-