public void objectToStream(Object obj, DataOutput out) throws Exception { Util.objectToStream(obj, out); }
public void objectToStream(Object obj, DataOutput out) throws Exception { Util.objectToStream(obj, out); }
public void objectToStream(Object obj, DataOutput out) throws Exception { Util.objectToStream(obj, out); }
protected void writeTypes(DataOutput out) throws Exception { int types_len=types != null? types.length : 0; out.write(types_len); if(types_len > 0) for(Class<?> type: types) Util.objectToStream(type, out); }
public void getState(OutputStream ostream) throws Exception { Util.objectToStream(stocks, new DataOutputStream(ostream)); }
protected void writeMethod(DataOutput out) throws Exception { if(method != null) { out.write(1); Util.objectToStream(method.getParameterTypes(),out); Util.objectToStream(method.getDeclaringClass(),out); } else out.write(0); }
protected void writeArgs(DataOutput out, Marshaller marshaller) throws Exception { int args_len=args != null? args.length : 0; out.write(args_len); if(args_len == 0) return; for(Object obj: args) { if(marshaller != null) marshaller.objectToStream(obj, out); else Util.objectToStream(obj, out); } }
public void writeTo(DataOutput out) throws Exception { out.writeInt(values.size()); for(Map.Entry<String,Object> entry: values.entrySet()) { Bits.writeString(entry.getKey(),out); Util.objectToStream(entry.getValue(), out); } }
public void getState(OutputStream output) throws Exception { DataOutputStream out=new DataOutputStream(new BufferedOutputStream(output, 1000)); try { synchronized(nodes) { Util.objectToStream(nodes, out); } } finally { Util.close(out); } }
public void getState(OutputStream output) throws Exception { int[][] copy_of_state=canvas.getCopyOfState(); Util.objectToStream(copy_of_state, new DataOutputStream(output)); }
public void getState(OutputStream ostream) throws Exception { Util.objectToStream(root.clone(), new DataOutputStream(ostream)); }
public void objectToStream(Object obj, DataOutput out) throws Exception { if(obj == null) { out.write(NULL); return; } if(obj instanceof Cache.Value) { Cache.Value value=(Cache.Value)obj; out.writeByte(VALUE); out.writeLong(value.getTimeout()); Util.objectToStream(value.getValue(), out); } else { out.writeByte(OBJ); Util.objectToStream(obj, out); } }
public void objectToStream(Object obj, DataOutput out) throws Exception { if(obj == null) { out.write(NULL); return; } if(obj instanceof Cache.Value) { Cache.Value value=(Cache.Value)obj; out.writeByte(VALUE); out.writeLong(value.getTimeout()); Util.objectToStream(value.getValue(), out); } else { out.writeByte(OBJ); Util.objectToStream(obj, out); } }
protected static Buffer replyToBuffer(Object obj, Marshaller marshaller) throws Exception { int estimated_size=marshaller != null? marshaller.estimatedSize(obj) : 50; ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(estimated_size, true); if(marshaller != null) marshaller.objectToStream(obj, out); else Util.objectToStream(obj, out); return out.getBuffer(); }
protected void writeMethod(DataOutput out) throws Exception { if(method != null) { out.write(1); Util.objectToStream(method.getParameterTypes(),out); Util.objectToStream(method.getDeclaringClass(),out); } else out.write(0); }
@Override public void getState(OutputStream ostream) throws Exception { synchronized (root) { LOG.info("State requested"); // all modifications to the tree Util.objectToStream(root, new DataOutputStream(ostream)); } }
@Override public void getState(OutputStream ostream) throws Exception { Util.objectToStream(consistentHash.get(), new DataOutputStream(ostream)); }
public void writeTo(DataOutput out) throws Exception { out.writeInt(values.size()); for(Map.Entry<String,Object> entry: values.entrySet()) { Bits.writeString(entry.getKey(),out); Util.objectToStream(entry.getValue(), out); } }
protected void writeArgs(DataOutput out, Marshaller marshaller) throws Exception { int args_len=args != null? args.length : 0; out.write(args_len); if(args_len == 0) return; for(Object obj: args) { if(marshaller != null) marshaller.objectToStream(obj, out); else Util.objectToStream(obj, out); } }
protected static Buffer replyToBuffer(Object obj, Marshaller marshaller) throws Exception { int estimated_size=marshaller != null? marshaller.estimatedSize(obj) : 50; ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(estimated_size, true); if(marshaller != null) marshaller.objectToStream(obj, out); else Util.objectToStream(obj, out); return out.getBuffer(); }