Interface NetworkBuffer.IOView
- All Superinterfaces:
DataInput, DataOutput
- Enclosing interface:
NetworkBuffer
Self-contained interface
that extends
You can access the io view of a network buffer with
This interface is separate from
DataInput and DataOutput for mostly reading/writing binary tags.
You can access the io view of a network buffer with
NetworkBuffer.ioView()
This interface is separate from
NetworkBuffer
because we don't want DataInput and DataOutput to be part of the public API.
You should use NetworkBuffer instead where possible.- API Note:
- You should never rely on the identity of
NetworkBuffer.IOViewas it is a value class candidate. - Implementation Note:
- This implementation removes checked exceptions as the backing
NetworkBufferwould not throwIOException's. AlsoreadLine()is not implemented as it's already deprecated inDataInputStream.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] bytes) voidreadFully(byte[] bytes, int off, int len) intreadInt()default StringreadLine()Deprecated, for removal: This API element is subject to removal in a future version.longreadLong()shortintintreadUTF()intskipBytes(int n) voidwrite(byte[] bytes) voidwrite(byte[] bytes, int off, int len) voidwrite(int lower) voidwriteBoolean(boolean value) voidwriteByte(int value) voidwriteBytes(String value) voidwriteChar(int value) voidwriteChars(String value) voidwriteDouble(double value) voidwriteFloat(float value) voidwriteInt(int value) voidwriteLong(long value) voidwriteShort(int value) void
-
Method Details
-
readLine
Deprecated, for removal: This API element is subject to removal in a future version. -
readFully
-
readFully
-
skipBytes
-
readBoolean
boolean readBoolean()- Specified by:
readBooleanin interfaceDataInput
-
readByte
-
readUnsignedByte
int readUnsignedByte()- Specified by:
readUnsignedBytein interfaceDataInput
-
readShort
-
readUnsignedShort
int readUnsignedShort()- Specified by:
readUnsignedShortin interfaceDataInput
-
readChar
-
readInt
-
readLong
-
readFloat
-
readDouble
double readDouble()- Specified by:
readDoublein interfaceDataInput
-
readUTF
-
write
void write(int lower) - Specified by:
writein interfaceDataOutput
-
write
void write(byte[] bytes) - Specified by:
writein interfaceDataOutput
-
write
void write(byte[] bytes, int off, int len) - Specified by:
writein interfaceDataOutput
-
writeBoolean
void writeBoolean(boolean value) - Specified by:
writeBooleanin interfaceDataOutput
-
writeByte
void writeByte(int value) - Specified by:
writeBytein interfaceDataOutput
-
writeShort
void writeShort(int value) - Specified by:
writeShortin interfaceDataOutput
-
writeChar
void writeChar(int value) - Specified by:
writeCharin interfaceDataOutput
-
writeInt
void writeInt(int value) - Specified by:
writeIntin interfaceDataOutput
-
writeLong
void writeLong(long value) - Specified by:
writeLongin interfaceDataOutput
-
writeFloat
void writeFloat(float value) - Specified by:
writeFloatin interfaceDataOutput
-
writeDouble
void writeDouble(double value) - Specified by:
writeDoublein interfaceDataOutput
-
writeBytes
- Specified by:
writeBytesin interfaceDataOutput
-
writeChars
- Specified by:
writeCharsin interfaceDataOutput
-
writeUTF
- Specified by:
writeUTFin interfaceDataOutput
-