/** * Reads a reference. */ @Override public Object readRef() throws IOException { return _refs.get(parseInt()); }
/** * Parses the length for an array * <p> * <pre> * l b32 b24 b16 b8 * </pre> */ @Override public int readLength() throws IOException { int code = read(); if (code != 'l') { _peek = code; return -1; } return parseInt(); }
return String.valueOf(parseInt()); case 'L': return String.valueOf(parseLong());
/** * Reads an integer * <p> * <pre> * I b32 b24 b16 b8 * </pre> */ @Override public int readInt() throws IOException { int tag = read(); switch (tag) { case 'T': return 1; case 'F': return 0; case 'I': return parseInt(); case 'L': return (int) parseLong(); case 'D': return (int) parseDouble(); default: throw expect("int", tag); } }
/** * Reads a long * <p> * <pre> * L b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ @Override public long readLong() throws IOException { int tag = read(); switch (tag) { case 'T': return 1; case 'F': return 0; case 'I': return parseInt(); case 'L': return parseLong(); case 'D': return (long) parseDouble(); default: throw expect("long", tag); } }
/** * Reads a double * <p> * <pre> * D b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ @Override public double readDouble() throws IOException { int tag = read(); switch (tag) { case 'T': return 1; case 'F': return 0; case 'I': return parseInt(); case 'L': return (double) parseLong(); case 'D': return parseDouble(); default: throw expect("long", tag); } }
/** * Reads a boolean * <p> * <pre> * T * F * </pre> */ @Override public boolean readBoolean() throws IOException { int tag = read(); switch (tag) { case 'T': return true; case 'F': return false; case 'I': return parseInt() == 0; case 'L': return parseLong() == 0; case 'D': return parseDouble() == 0.0; case 'N': return false; default: throw expect("boolean", tag); } }
int ref = parseInt();
/** * Reads a reference. */ public Object readRef() throws IOException { return _refs.get(parseInt()); }
/** * Reads a reference. */ @Override public Object readRef() throws IOException { return _refs.get(parseInt()); }
/** * Reads a reference. */ public Object readRef() throws IOException { return _refs.get(parseInt()); }
/** * Reads a reference. */ @Override public Object readRef() throws IOException { return _refs.get(parseInt()); }
/** * Reads a reference. */ public Object readRef() throws IOException { return _refs.get(parseInt()); }
/** * Parses the length for an array * * <pre> * l b32 b24 b16 b8 * </pre> */ public int readLength() throws IOException { int code = read(); if (code != 'l') { _peek = code; return -1; } return parseInt(); }
/** * Parses the length for an array * <p> * <pre> * l b32 b24 b16 b8 * </pre> */ @Override public int readLength() throws IOException { int code = read(); if (code != 'l') { _peek = code; return -1; } return parseInt(); }
/** * Parses the length for an array * <p> * <pre> * l b32 b24 b16 b8 * </pre> */ @Override public int readLength() throws IOException { int code = read(); if (code != 'l') { _peek = code; return -1; } return parseInt(); }
/** * Parses the length for an array * * <pre> * l b32 b24 b16 b8 * </pre> */ public int readLength() throws IOException { int code = read(); if (code != 'l') { _peek = code; return -1; } return parseInt(); }
/** * Parses the length for an array * * <pre> * l b32 b24 b16 b8 * </pre> */ public int readLength() throws IOException { int code = read(); if (code != 'l') { _peek = code; return -1; } return parseInt(); }
/** * Reads a long * * <pre> * L b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ public long readLong() throws IOException { int tag = read(); switch (tag) { case 'T': return 1; case 'F': return 0; case 'I': return parseInt(); case 'L': return parseLong(); case 'D': return (long) parseDouble(); default: throw expect("long", tag); } }