@Override public void readFully(byte[] buf, int off, int len) { try { checkEOF(_read(buf, off, len), len); } catch (IOException e) { throw new RuntimeException(e); } }
@Override public int readUShort() { byte buf[] = new byte[LittleEndianConsts.SHORT_SIZE]; try { checkEOF(read(buf), LittleEndianConsts.SHORT_SIZE); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getUShort(buf); }
@Override public int readInt() { byte buf[] = new byte[LittleEndianConsts.INT_SIZE]; try { checkEOF(read(buf), buf.length); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getInt(buf); }
@Override public int readUByte() { byte buf[] = new byte[1]; try { checkEOF(read(buf), 1); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getUByte(buf); }
@Override public long readLong() { byte buf[] = new byte[LittleEndianConsts.LONG_SIZE]; try { checkEOF(read(buf), LittleEndianConsts.LONG_SIZE); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getLong(buf); }
public int readUByte() { int ch; try { ch = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch); return ch; } public double readDouble() {
public void readFully(byte[] buf, int off, int len) { int max = off+len; for(int i=off; i<max; i++) { int ch; try { ch = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch); buf[i] = (byte) ch; } } }
public int readUByte() { int ch; try { ch = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch); return ch; } public double readDouble() {
public void readFully(byte[] buf, int off, int len) { int max = off+len; for(int i=off; i<max; i++) { int ch; try { ch = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch); buf[i] = (byte) ch; } } }
public int readUShort() { int ch1; int ch2; try { ch1 = in.read(); ch2 = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch1 | ch2); return (ch2 << 8) + (ch1 << 0); } private static void checkEOF(int value) {
public int readUShort() { int ch1; int ch2; try { ch1 = in.read(); ch2 = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch1 | ch2); return (ch2 << 8) + (ch1 << 0); } private static void checkEOF(int value) {
public int readInt() { int ch1; int ch2; int ch3; int ch4; try { ch1 = in.read(); ch2 = in.read(); ch3 = in.read(); ch4 = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch1 | ch2 | ch3 | ch4); return (ch4 << 24) + (ch3 << 16) + (ch2 << 8) + (ch1 << 0); } public long readLong() {
@Override public void readFully(byte[] buf, int off, int len) { try { checkEOF(_read(buf, off, len), len); } catch (IOException e) { throw new RuntimeException(e); } }
public int readInt() { int ch1; int ch2; int ch3; int ch4; try { ch1 = in.read(); ch2 = in.read(); ch3 = in.read(); ch4 = in.read(); } catch (IOException e) { throw new RuntimeException(e); } checkEOF(ch1 | ch2 | ch3 | ch4); return (ch4 << 24) + (ch3 << 16) + (ch2 << 8) + (ch1 << 0); } public long readLong() {
@Override public int readUByte() { byte buf[] = new byte[1]; try { checkEOF(read(buf), 1); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getUByte(buf); }
@Override public long readLong() { byte buf[] = new byte[LittleEndianConsts.LONG_SIZE]; try { checkEOF(read(buf), LittleEndianConsts.LONG_SIZE); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getLong(buf); }
throw new RuntimeException(e); checkEOF(b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7); return (((long)b7 << 56) + ((long)b6 << 48) +
@Override public int readInt() { byte buf[] = new byte[LittleEndianConsts.INT_SIZE]; try { checkEOF(read(buf), buf.length); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getInt(buf); }
@Override public int readUShort() { byte buf[] = new byte[LittleEndianConsts.SHORT_SIZE]; try { checkEOF(read(buf), LittleEndianConsts.SHORT_SIZE); } catch (IOException e) { throw new RuntimeException(e); } return LittleEndian.getUShort(buf); }
throw new RuntimeException(e); checkEOF(b0 | b1 | b2 | b3 | b4 | b5 | b6 | b7); return (((long)b7 << 56) + ((long)b6 << 48) +