public int read(byte[] buf, int off, int len) throws IOException { byte[] b = (byte[])peekCallback().readFromStream(); if (b.length != len) { throw new StreamCorruptedException("Expected " + len + " bytes from stream, got " + b.length); } System.arraycopy(b, 0, buf, off, len); return len; }
public void readFully(byte[] buf, int off, int len) throws IOException { byte[] b = (byte[])peekCallback().readFromStream(); System.arraycopy(b, 0, buf, off, len); }
public double readDouble() throws IOException { return ((Double)peekCallback().readFromStream()).doubleValue(); }
public int readUnsignedByte() throws IOException { int b = ((Byte)peekCallback().readFromStream()).byteValue(); if (b < 0) { b += Byte.MAX_VALUE; } return b; }
public int readUnsignedShort() throws IOException { int b = ((Short)peekCallback().readFromStream()).shortValue(); if (b < 0) { b += Short.MAX_VALUE; } return b; }
public int read(byte[] buf, int off, int len) throws IOException { byte[] b = (byte[])peekCallback().readFromStream(); if (b.length != len) { throw new StreamCorruptedException("Expected " + len + " bytes from stream, got " + b.length); } System.arraycopy(b, 0, buf, off, len); return len; }
public int read(byte[] buf, int off, int len) throws IOException { byte[] b = (byte[])peekCallback().readFromStream(); if (b.length != len) { throw new StreamCorruptedException("Expected " + len + " bytes from stream, got " + b.length); } System.arraycopy(b, 0, buf, off, len); return len; }
@Override public void readFully(final byte[] buf, final int off, final int len) throws IOException { final byte[] b = (byte[])peekCallback().readFromStream(); System.arraycopy(b, 0, buf, off, len); }
@Override public int read(final byte[] buf, final int off, final int len) throws IOException { final byte[] b = (byte[])peekCallback().readFromStream(); if (b.length != len) { throw new StreamCorruptedException("Expected " + len + " bytes from stream, got " + b.length); } System.arraycopy(b, 0, buf, off, len); return len; }
public short readShort() throws IOException { return ((Short)peekCallback().readFromStream()).shortValue(); }
public int readUnsignedByte() throws IOException { return ((Byte)peekCallback().readFromStream()).intValue() & 0xff; }
public long readLong() throws IOException { return ((Long)peekCallback().readFromStream()).longValue(); }
public boolean readBoolean() throws IOException { return ((Boolean)peekCallback().readFromStream()).booleanValue(); }
public char readChar() throws IOException { return ((Character)peekCallback().readFromStream()).charValue(); }
public int readInt() throws IOException { return ((Integer)peekCallback().readFromStream()).intValue(); }
public String readUTF() throws IOException { return (String)peekCallback().readFromStream(); }
public int readUnsignedShort() throws IOException { return ((Short)peekCallback().readFromStream()).intValue() & 0xffff; }
protected Object readObjectOverride() throws IOException { return peekCallback().readFromStream(); }
public float readFloat() throws IOException { return ((Float)peekCallback().readFromStream()).floatValue(); }
public byte readByte() throws IOException { return ((Byte)peekCallback().readFromStream()).byteValue(); }