/** * Starts reading the call * * <p>A successful completion will have a single value: * * <pre> * string * </pre> */ public String readMethod() throws IOException { _method = readString(); return _method; }
public String readUTF() throws IOException { return hessian2Input.readString(); }
/** * Starts reading the call * * <p>A successful completion will have a single value: * * <pre> * string * </pre> */ public String readMethod() throws IOException { _method = readString(); return _method; }
/** * Starts reading the call * * <p>A successful completion will have a single value: * * <pre> * string * </pre> */ public String readMethod() throws IOException { _method = readString(); return _method; }
/** * Starts reading the call * * <p>A successful completion will have a single value: * * <pre> * string * </pre> */ public String readMethod() throws IOException { _method = readString(); return _method; }
/** * Reads an object definition: * * <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); }
/** * Reads a remote object. */ public Object readRemote() throws IOException { String type = readType(); String url = readString(); return resolveRemote(type, url); }
/** * Reads a remote object. */ public Object readRemote() throws IOException { String type = readType(); String url = readString(); return resolveRemote(type, url); }
/** * Reads a remote object. */ public Object readRemote() throws IOException { String type = readType(); String url = readString(); return resolveRemote(type, url); }
/** * Reads a remote object. */ public Object readRemote() throws IOException { String type = readType(); String url = readString(); return resolveRemote(type, url); }
/** * Read the body from an input stream. */ @Override public void readBody(InputStream is) throws IOException, JMSException { if (is == null) return; Hessian2Input in = new Hessian2Input(is); _text = in.readString(); in.close(); } }
String header = in.readString(); keyAlgorithm = in.readString(); else if ("algorithm".equals(header)) algorithm = in.readString(); else if ("key".equals(header)) encKey = in.readBytes();
String header = in.readString(); keyAlgorithm = in.readString(); else if ("algorithm".equals(header)) algorithm = in.readString(); else if ("key".equals(header)) encKey = in.readBytes();
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 } } }
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 } } }
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 } } }
/** * Reads an object definition: * * <pre> * O string <int> (string)* <value>* * </pre> */ private void readObjectDefinition(Class<?> cl) throws IOException { String type = readString(); int len = readInt(); SerializerFactory factory = findSerializerFactory(); Deserializer reader = factory.getObjectDeserializer(type, null); Object[] fields = reader.createFields(len); String[] fieldNames = new String[len]; for (int i = 0; i < len; i++) { String name = readString(); fields[i] = reader.createField(name); fieldNames[i] = name; } ObjectDefinition def = new ObjectDefinition(type, reader, fields, fieldNames); _classDefs.add(def); }
/** * Reads an object definition: * * <pre> * O string <int> (string)* <value>* * </pre> */ private void readObjectDefinition(Class<?> cl) throws IOException { String type = readString(); int len = readInt(); SerializerFactory factory = findSerializerFactory(); Deserializer reader = factory.getObjectDeserializer(type, null); Object []fields = reader.createFields(len); String []fieldNames = new String[len]; for (int i = 0; i < len; i++) { String name = readString(); fields[i] = reader.createField(name); fieldNames[i] = name; } ObjectDefinition def = new ObjectDefinition(type, reader, fields, fieldNames); _classDefs.add(def); }
/** * Reads an object definition: * * <pre> * O string <int> (string)* <value>* * </pre> */ private void readObjectDefinition(Class<?> cl) throws IOException { String type = readString(); int len = readInt(); SerializerFactory factory = findSerializerFactory(); Deserializer reader = factory.getObjectDeserializer(type, null); Object []fields = reader.createFields(len); String []fieldNames = new String[len]; for (int i = 0; i < len; i++) { String name = readString(); fields[i] = reader.createField(name); fieldNames[i] = name; } ObjectDefinition def = new ObjectDefinition(type, reader, fields, fieldNames); _classDefs.add(def); }
/** * Read the properties from an input stream. */ public void readProperties(InputStream is) throws IOException, JMSException { if (is == null) return; Hessian2Input in = new Hessian2Input(is); _messageId = in.readString(); _isRedelivered = in.readBoolean(); _priority = in.readInt(); _timestamp = in.readLong(); _deliveryMode = in.readInt(); _destination = (Destination) in.readObject(); _replyTo = (Destination) in.readObject(); while (! in.isEnd()) { String key = in.readString(); Object value = in.readObject(); setObjectProperty(key, value); } in.close(); }