mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-13 09:11:03 -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;
|
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.
|
* Reads the next byte array.
|
||||||
*
|
*
|
||||||
|
|
|
@ -87,14 +87,6 @@ public interface NetOutput {
|
||||||
*/
|
*/
|
||||||
public void writeDouble(double d) throws IOException;
|
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.
|
* Writes a byte array.
|
||||||
*
|
*
|
||||||
|
|
|
@ -116,12 +116,6 @@ public class StreamNetInput implements NetInput {
|
||||||
return Double.longBitsToDouble(this.readLong());
|
return Double.longBitsToDouble(this.readLong());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public byte[] readPrefixedBytes() throws IOException {
|
|
||||||
short length = this.readShort();
|
|
||||||
return this.readBytes(length);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] readBytes(int length) throws IOException {
|
public byte[] readBytes(int length) throws IOException {
|
||||||
if(length < 0) {
|
if(length < 0) {
|
||||||
|
|
|
@ -93,12 +93,6 @@ public class StreamNetOutput implements NetOutput {
|
||||||
this.writeLong(Double.doubleToLongBits(d));
|
this.writeLong(Double.doubleToLongBits(d));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writePrefixedBytes(byte b[]) throws IOException {
|
|
||||||
this.writeShort(b.length);
|
|
||||||
this.writeBytes(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeBytes(byte b[]) throws IOException {
|
public void writeBytes(byte b[]) throws IOException {
|
||||||
this.writeBytes(b, b.length);
|
this.writeBytes(b, b.length);
|
||||||
|
|
|
@ -96,12 +96,6 @@ public class ByteBufNetInput implements NetInput {
|
||||||
return this.buf.readDouble();
|
return this.buf.readDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public byte[] readPrefixedBytes() throws IOException {
|
|
||||||
short length = this.buf.readShort();
|
|
||||||
return this.readBytes(length);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] readBytes(int length) throws IOException {
|
public byte[] readBytes(int length) throws IOException {
|
||||||
if(length < 0) {
|
if(length < 0) {
|
||||||
|
|
|
@ -76,12 +76,6 @@ public class ByteBufNetOutput implements NetOutput {
|
||||||
this.buf.writeDouble(d);
|
this.buf.writeDouble(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void writePrefixedBytes(byte b[]) throws IOException {
|
|
||||||
this.buf.writeShort(b.length);
|
|
||||||
this.buf.writeBytes(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeBytes(byte b[]) throws IOException {
|
public void writeBytes(byte b[]) throws IOException {
|
||||||
this.buf.writeBytes(b);
|
this.buf.writeBytes(b);
|
||||||
|
|
Loading…
Reference in a new issue