Remove prefixed byte array methods.

This commit is contained in:
Steven Smith 2015-08-22 20:25:04 -07:00
parent b7a1cdf2cc
commit 494805306f
6 changed files with 0 additions and 40 deletions

View file

@ -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.
*

View file

@ -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.
*

View file

@ -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) {

View file

@ -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);

View file

@ -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) {

View file

@ -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);