mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-12 08:41:00 -05:00
Remove prefixed byte array methods.
This commit is contained in:
parent
b7a1cdf2cc
commit
494805306f
6 changed files with 0 additions and 40 deletions
|
@ -103,14 +103,6 @@ public interface NetInput {
|
|||
*/
|
||||
public double readDouble() throws IOException;
|
||||
|
||||
/**
|
||||
* Reads the next byte array, getting the length from a prefixed length value.
|
||||
*
|
||||
* @return The next byte array.
|
||||
* @throws java.io.IOException If an I/O error occurs.
|
||||
*/
|
||||
public byte[] readPrefixedBytes() throws IOException;
|
||||
|
||||
/**
|
||||
* Reads the next byte array.
|
||||
*
|
||||
|
|
|
@ -87,14 +87,6 @@ public interface NetOutput {
|
|||
*/
|
||||
public void writeDouble(double d) throws IOException;
|
||||
|
||||
/**
|
||||
* Writes a byte array, prefixing the written data with the array's length.
|
||||
*
|
||||
* @param b Byte array to write.
|
||||
* @throws java.io.IOException If an I/O error occurs.
|
||||
*/
|
||||
public void writePrefixedBytes(byte b[]) throws IOException;
|
||||
|
||||
/**
|
||||
* Writes a byte array.
|
||||
*
|
||||
|
|
|
@ -116,12 +116,6 @@ public class StreamNetInput implements NetInput {
|
|||
return Double.longBitsToDouble(this.readLong());
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readPrefixedBytes() throws IOException {
|
||||
short length = this.readShort();
|
||||
return this.readBytes(length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readBytes(int length) throws IOException {
|
||||
if(length < 0) {
|
||||
|
|
|
@ -93,12 +93,6 @@ public class StreamNetOutput implements NetOutput {
|
|||
this.writeLong(Double.doubleToLongBits(d));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writePrefixedBytes(byte b[]) throws IOException {
|
||||
this.writeShort(b.length);
|
||||
this.writeBytes(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBytes(byte b[]) throws IOException {
|
||||
this.writeBytes(b, b.length);
|
||||
|
|
|
@ -96,12 +96,6 @@ public class ByteBufNetInput implements NetInput {
|
|||
return this.buf.readDouble();
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readPrefixedBytes() throws IOException {
|
||||
short length = this.buf.readShort();
|
||||
return this.readBytes(length);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readBytes(int length) throws IOException {
|
||||
if(length < 0) {
|
||||
|
|
|
@ -76,12 +76,6 @@ public class ByteBufNetOutput implements NetOutput {
|
|||
this.buf.writeDouble(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writePrefixedBytes(byte b[]) throws IOException {
|
||||
this.buf.writeShort(b.length);
|
||||
this.buf.writeBytes(b);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeBytes(byte b[]) throws IOException {
|
||||
this.buf.writeBytes(b);
|
||||
|
|
Loading…
Reference in a new issue