diff --git a/src/main/java/org/spacehq/packetlib/io/NetInput.java b/src/main/java/org/spacehq/packetlib/io/NetInput.java index d6294b92..1e792a93 100644 --- a/src/main/java/org/spacehq/packetlib/io/NetInput.java +++ b/src/main/java/org/spacehq/packetlib/io/NetInput.java @@ -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. * diff --git a/src/main/java/org/spacehq/packetlib/io/NetOutput.java b/src/main/java/org/spacehq/packetlib/io/NetOutput.java index 30dff1fa..95323a8c 100644 --- a/src/main/java/org/spacehq/packetlib/io/NetOutput.java +++ b/src/main/java/org/spacehq/packetlib/io/NetOutput.java @@ -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. * diff --git a/src/main/java/org/spacehq/packetlib/io/stream/StreamNetInput.java b/src/main/java/org/spacehq/packetlib/io/stream/StreamNetInput.java index c980e183..4740d7a5 100644 --- a/src/main/java/org/spacehq/packetlib/io/stream/StreamNetInput.java +++ b/src/main/java/org/spacehq/packetlib/io/stream/StreamNetInput.java @@ -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) { diff --git a/src/main/java/org/spacehq/packetlib/io/stream/StreamNetOutput.java b/src/main/java/org/spacehq/packetlib/io/stream/StreamNetOutput.java index 9a05bd7e..963212ce 100644 --- a/src/main/java/org/spacehq/packetlib/io/stream/StreamNetOutput.java +++ b/src/main/java/org/spacehq/packetlib/io/stream/StreamNetOutput.java @@ -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); diff --git a/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetInput.java b/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetInput.java index 2fb2a605..27223781 100644 --- a/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetInput.java +++ b/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetInput.java @@ -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) { diff --git a/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetOutput.java b/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetOutput.java index 4983c0e1..5c8390ae 100644 --- a/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetOutput.java +++ b/src/main/java/org/spacehq/packetlib/tcp/io/ByteBufNetOutput.java @@ -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);