public long getUInt() { ensureAvailable(4); long l = ((data[rpos++] << 24) & 0xff000000L) | ((data[rpos++] << 16) & 0x00ff0000L) | ((data[rpos++] << 8) & 0x0000ff00L) | ((data[rpos++]) & 0x000000ffL); return l; }
public String getString() { int len = getInt(); if (len < 0 || len > 32768) { throw new IllegalStateException("Bad item length: " + len); } ensureAvailable(len); String s = new String(data, rpos, len); rpos += len; return s; }
public long getLong() { ensureAvailable(8); long l = (((long) data[rpos++] << 56) & 0xff00000000000000L) | (((long) data[rpos++] << 48) & 0x00ff000000000000L) | (((long) data[rpos++] << 40) & 0x0000ff0000000000L) | (((long) data[rpos++] << 32) & 0x000000ff00000000L) | (((long) data[rpos++] << 24) & 0x00000000ff000000L) | (((long) data[rpos++] << 16) & 0x0000000000ff0000L) | (((long) data[rpos++] << 8) & 0x000000000000ff00L) | (((long) data[rpos++]) & 0x00000000000000ffL); return l; }
public void getRawBytes(byte[] buf, int off, int len) { ensureAvailable(len); System.arraycopy(data, rpos, buf, off, len); rpos += len; }
public byte getByte() { ensureAvailable(1); return data[rpos++]; }