| Constructor and Description |
|---|
ByteBufferNetOutput(ByteBuffer buffer) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Flushes the output.
|
ByteBuffer |
getByteBuffer() |
void |
writeBoolean(boolean b)
Writes a boolean.
|
void |
writeByte(int b)
Writes a byte.
|
void |
writeBytes(byte[] b)
Writes a byte array.
|
void |
writeBytes(byte[] b,
int length)
Writes a byte array, using the given amount of bytes.
|
void |
writeChar(int c)
Writes a char.
|
void |
writeDouble(double d)
Writes a double.
|
void |
writeFloat(float f)
Writes a float.
|
void |
writeInt(int i)
Writes a integer.
|
void |
writeInts(int[] i)
Writes an int array.
|
void |
writeInts(int[] i,
int length)
Writes an int array, using the given amount of bytes.
|
void |
writeLong(long l)
Writes a long.
|
void |
writeLongs(long[] l)
Writes a long array.
|
void |
writeLongs(long[] l,
int length)
Writes a long array, using the given amount of bytes.
|
void |
writeShort(int s)
Writes a short.
|
void |
writeShorts(short[] s)
Writes a short array.
|
void |
writeShorts(short[] s,
int length)
Writes a short array, using the given amount of bytes.
|
void |
writeString(String s)
Writes a string.
|
void |
writeUUID(UUID uuid)
Writes a UUID.
|
void |
writeVarInt(int i)
Writes a varint.
|
void |
writeVarLong(long l)
Writes a varlong.
|
public ByteBufferNetOutput(ByteBuffer buffer)
public ByteBuffer getByteBuffer()
public void writeBoolean(boolean b)
throws IOException
NetOutputwriteBoolean in interface NetOutputb - Boolean to write.IOException - If an I/O error occurs.public void writeByte(int b)
throws IOException
NetOutputwriteByte in interface NetOutputb - Byte to write.IOException - If an I/O error occurs.public void writeShort(int s)
throws IOException
NetOutputwriteShort in interface NetOutputs - Short to write.IOException - If an I/O error occurs.public void writeChar(int c)
throws IOException
NetOutputwriteChar in interface NetOutputc - Char to write.IOException - If an I/O error occurs.public void writeInt(int i)
throws IOException
NetOutputwriteInt in interface NetOutputi - Integer to write.IOException - If an I/O error occurs.public void writeVarInt(int i)
throws IOException
NetOutputwriteVarInt in interface NetOutputi - Varint to write.IOException - If an I/O error occurs.public void writeLong(long l)
throws IOException
NetOutputwriteLong in interface NetOutputl - Long to write.IOException - If an I/O error occurs.public void writeVarLong(long l)
throws IOException
NetOutputwriteVarLong in interface NetOutputl - Varlong to write.IOException - If an I/O error occurs.public void writeFloat(float f)
throws IOException
NetOutputwriteFloat in interface NetOutputf - Float to write.IOException - If an I/O error occurs.public void writeDouble(double d)
throws IOException
NetOutputwriteDouble in interface NetOutputd - Double to write.IOException - If an I/O error occurs.public void writeBytes(byte[] b)
throws IOException
NetOutputwriteBytes in interface NetOutputb - Byte array to write.IOException - If an I/O error occurs.public void writeBytes(byte[] b,
int length)
throws IOException
NetOutputwriteBytes in interface NetOutputb - Byte array to write.length - Bytes to write.IOException - If an I/O error occurs.public void writeShorts(short[] s)
throws IOException
NetOutputwriteShorts in interface NetOutputs - Short array to write.IOException - If an I/O error occurs.public void writeShorts(short[] s,
int length)
throws IOException
NetOutputwriteShorts in interface NetOutputs - Short array to write.length - Shorts to write.IOException - If an I/O error occurs.public void writeInts(int[] i)
throws IOException
NetOutputwriteInts in interface NetOutputi - Int array to write.IOException - If an I/O error occurs.public void writeInts(int[] i,
int length)
throws IOException
NetOutputwriteInts in interface NetOutputi - Int array to write.length - Ints to write.IOException - If an I/O error occurs.public void writeLongs(long[] l)
throws IOException
NetOutputwriteLongs in interface NetOutputl - Long array to write.IOException - If an I/O error occurs.public void writeLongs(long[] l,
int length)
throws IOException
NetOutputwriteLongs in interface NetOutputl - Long array to write.length - Longs to write.IOException - If an I/O error occurs.public void writeString(String s) throws IOException
NetOutputwriteString in interface NetOutputs - String to write.IOException - If an I/O error occurs.public void writeUUID(UUID uuid) throws IOException
NetOutputwriteUUID in interface NetOutputuuid - UUID to write.IOException - If an I/O error occurs.public void flush()
throws IOException
NetOutputflush in interface NetOutputIOException - If an I/O error occurs.Copyright © 2022. All rights reserved.