/** * Writes the object header to the stream (for Hessian 2.0), or a * Map for Hessian 1.0. Object writers will call * <code>writeObjectBegin</code> followed by the map contents and then * call <code>writeObjectEnd</code>. * <p> * <code><pre> * C type int <key>* * C int <value>* * </pre></code> * * @return true if the object has already been defined. */ public int writeObjectBegin(String type) throws IOException { writeMapBegin(type); return -2; }
@Override public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) return; Map map = (Map) obj; Class cl = obj.getClass(); if (cl.equals(HashMap.class) || !_isSendJavaType || !(obj instanceof java.io.Serializable)) out.writeMapBegin(null); else out.writeMapBegin(obj.getClass().getName()); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeMapEnd(); } }
/** * Writes the object header to the stream (for Hessian 2.0), or a * Map for Hessian 1.0. Object writers will call * <code>writeObjectBegin</code> followed by the map contents and then * call <code>writeObjectEnd</code>. * <p> * <code><pre> * C type int <key>* * C int <value>* * </pre></code> * * @return true if the object has already been defined. */ public int writeObjectBegin(String type) throws IOException { writeMapBegin(type); return -2; }
/** * Writes the object header to the stream (for Hessian 2.0), or a * Map for Hessian 1.0. Object writers will call * <code>writeObjectBegin</code> followed by the map contents and then * call <code>writeObjectEnd</code>. * <p> * <code><pre> * C type int <key>* * C int <value>* * </pre></code> * * @return true if the object has already been defined. */ public int writeObjectBegin(String type) throws IOException { writeMapBegin(type); return -2; }
/** * Writes the object header to the stream (for Hessian 2.0), or a * Map for Hessian 1.0. Object writers will call * <code>writeObjectBegin</code> followed by the map contents and then * call <code>writeObjectEnd</code>. * * <code><pre> * C type int <key>* * C int <value>* * </pre></code> * * @return true if the object has already been defined. */ public int writeObjectBegin(String type) throws IOException { writeMapBegin(type); return -2; }
/** * Writes the object header to the stream (for Hessian 2.0), or a * Map for Hessian 1.0. Object writers will call * <code>writeObjectBegin</code> followed by the map contents and then * call <code>writeObjectEnd</code>. * * <code><pre> * C type int <key>* * C int <value>* * </pre></code> * * @return true if the object has already been defined. */ public int writeObjectBegin(String type) throws IOException { writeMapBegin(type); return -2; }
/** * Writes the object header to the stream (for Hessian 2.0), or a * Map for Hessian 1.0. Object writers will call * <code>writeObjectBegin</code> followed by the map contents and then * call <code>writeObjectEnd</code>. * * <code><pre> * C type int <key>* * C int <value>* * </pre></code> * * @return true if the object has already been defined. */ public int writeObjectBegin(String type) throws IOException { writeMapBegin(type); return -2; }
public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) return; Map map = (Map) obj; Class cl = obj.getClass(); if (cl.equals(HashMap.class) || ! _isSendJavaType || ! (obj instanceof java.io.Serializable)) out.writeMapBegin(null); else out.writeMapBegin(obj.getClass().getName()); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeMapEnd(); } }
@Override public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) return; Map map = (Map) obj; Class cl = obj.getClass(); if (cl.equals(HashMap.class) || !_isSendJavaType || !(obj instanceof java.io.Serializable)) out.writeMapBegin(null); else out.writeMapBegin(obj.getClass().getName()); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeMapEnd(); } }
@Override public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) return; Map map = (Map) obj; Class cl = obj.getClass(); if (cl.equals(HashMap.class) || !_isSendJavaType || !(obj instanceof java.io.Serializable)) out.writeMapBegin(null); else out.writeMapBegin(obj.getClass().getName()); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeMapEnd(); } }
public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) return; Map map = (Map) obj; Class cl = obj.getClass(); if (cl.equals(HashMap.class) || ! _isSendJavaType || ! (obj instanceof java.io.Serializable)) out.writeMapBegin(null); else out.writeMapBegin(obj.getClass().getName()); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeMapEnd(); } }
public void writeObject(Object obj, AbstractHessianOutput out) throws IOException { if (out.addRef(obj)) return; Map map = (Map) obj; Class cl = obj.getClass(); if (cl.equals(HashMap.class) || ! _isSendJavaType || ! (obj instanceof java.io.Serializable)) out.writeMapBegin(null); else out.writeMapBegin(obj.getClass().getName()); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } out.writeMapEnd(); } }