return String.valueOf(parseLong()); case 'D': return String.valueOf(parseDouble());
/** * 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 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 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); } }
return Double.valueOf(parseDouble());
/** * 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); } }
/** * Reads a double * * <pre> * D b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ 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 an integer * * <pre> * I b32 b24 b16 b8 * </pre> */ 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 * * <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); } }
/** * Reads a double * * <pre> * D b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ 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 an integer * * <pre> * I b32 b24 b16 b8 * </pre> */ 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 * * <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); } }
/** * Reads an integer * * <pre> * I b32 b24 b16 b8 * </pre> */ 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 boolean * * <pre> * T * F * </pre> */ 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); } }
/** * Reads a double * * <pre> * D b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ 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 * * <pre> * T * F * </pre> */ 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); } }
/** * Reads a boolean * * <pre> * T * F * </pre> */ 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); } }
/** * 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 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); } }