/** * Reads a null * <p> * <pre> * N * </pre> */ @Override public void readNull() throws IOException { int tag = read(); switch (tag) { case 'N': return; default: throw expect("null", tag); } }
/** * Reads a fault. */ private HashMap readFault() throws IOException { HashMap map = new HashMap(); int code = read(); for (; code > 0 && code != 'Z'; code = read()) { _offset--; Object key = readObject(); Object value = readObject(); if (key != null && value != null) map.put(key, value); } if (code != 'Z') throw expect("fault", code); return map; }
/** * Reads a date. * <p> * <pre> * T b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ @Override public long readUTCDate() throws IOException { int tag = read(); if (tag == BC_DATE) { return parseLong(); } else if (tag == BC_DATE_MINUTE) { return parseInt() * 60000L; } else throw expect("date", tag); }
throw expect("binary", tag);
throw expect("bytes", tag);
throw expect("string", tag);
throw expect("binary", tag);
throw expect("char", tag);
throw expect("byte[]", code);
throw expect("byte[]", code);
throw expect("string", code);
throw expect("long", tag);
throw expect("double", tag);
throw expect("integer", tag);
throw expect("boolean", tag);
/** * Reads a fault. */ private HashMap readFault() throws IOException { HashMap map = new HashMap(); int code = read(); for (; code > 0 && code != 'Z'; code = read()) { _offset--; Object key = readObject(); Object value = readObject(); if (key != null && value != null) map.put(key, value); } if (code != 'Z') throw expect("fault", code); return map; }
/** * Reads a date. * <p> * <pre> * T b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ @Override public long readUTCDate() throws IOException { int tag = read(); if (tag == BC_DATE) { return parseLong(); } else if (tag == BC_DATE_MINUTE) { return parseInt() * 60000L; } else throw expect("date", tag); }
/** * Reads a date. * <p> * <pre> * T b64 b56 b48 b40 b32 b24 b16 b8 * </pre> */ @Override public long readUTCDate() throws IOException { int tag = read(); if (tag == BC_DATE) { return parseLong(); } else if (tag == BC_DATE_MINUTE) { return parseInt() * 60000L; } else throw expect("date", tag); }