/** * Reads a short * <p> * <pre> * I b32 b24 b16 b8 * </pre> */ public short readShort() throws IOException { return (short) readInt(); }
/** * Returns the number of method arguments * <p> * <pre> * int * </pre> */ @Override public int readMethodArgLength() throws IOException { return readInt(); }
@Override public byte readByte() throws IOException { return (byte) mH2i.readInt(); }
@Override public short readShort() throws IOException { return (short) mH2i.readInt(); }
@Override public short readShort() throws IOException { return (short) mH2i.readInt(); }
@Override public byte readByte() throws IOException { return (byte) mH2i.readInt(); }
@Override public int readInt() throws IOException { return mH2i.readInt(); }
@Override public int readInt() throws IOException { return mH2i.readInt(); }
private String readLenString() throws IOException { int len = readInt(); _isLastChunk = true; _chunkLength = len; _sbuf.setLength(0); int ch; while ((ch = parseChar()) >= 0) _sbuf.append((char) ch); return _sbuf.toString(); }
DeflateInputStream(Hessian2Input in) throws IOException { _in = in; int len = in.readInt(); if (len != 0) throw new IOException("expected no headers"); _bodyIn = _in.readInputStream(); _inflateIn = new InflaterInputStream(_bodyIn); }
@Override public void close() throws IOException { Hessian2Input in = _in; _in = null; if (in != null) { _inflateIn.close(); _bodyIn.close(); int len = in.readInt(); if (len != 0) throw new IOException("Unexpected footer"); in.completeEnvelope(); in.close(); } } }
@Override public void close() throws IOException { Hessian2Input in = _in; _in = null; if (in != null) { _cipherIn.close(); _bodyIn.close(); int len = in.readInt(); if (len != 0) throw new IOException("Unexpected footer"); in.completeEnvelope(); in.close(); } } }
/** * Reads an object definition: * <p> * <pre> * O string <int> (string)* <value>* * </pre> */ private void readObjectDefinition(Class cl) throws IOException { String type = readString(); int len = readInt(); String[] fieldNames = new String[len]; for (int i = 0; i < len; i++) fieldNames[i] = readString(); ObjectDefinition def = new ObjectDefinition(type, fieldNames); if (_classDefs == null) _classDefs = new ArrayList(); _classDefs.add(def); }
@Override public void close() throws IOException { Hessian2Input in = _in; _in = null; if (in != null) { _bodyIn.close(); int len = in.readInt(); byte[] signature = null; for (int i = 0; i < len; i++) { String header = in.readString(); if ("signature".equals(header)) signature = in.readBytes(); } in.completeEnvelope(); in.close(); if (signature == null) throw new IOException("Expected signature"); byte[] sig = _mac.doFinal(); if (sig.length != signature.length) throw new IOException("mismatched signature"); for (int i = 0; i < sig.length; i++) { if (signature[i] != sig[i]) throw new IOException("mismatched signature"); } // XXX: save principal } } }
int ref = readInt();
byte[] encKey = null; int len = in.readInt();
byte[] encKey = null; int len = in.readInt();
/** * Reads a short * <p> * <pre> * I b32 b24 b16 b8 * </pre> */ public short readShort() throws IOException { return (short) readInt(); }