本文整理了Java中org.jgroups.util.Util.objectToStream()
方法的一些代码示例,展示了Util.objectToStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.objectToStream()
方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:objectToStream
暂无
代码示例来源:origin: wildfly/wildfly
public void objectToStream(Object obj, DataOutput out) throws Exception {
Util.objectToStream(obj, out);
}
代码示例来源:origin: wildfly/wildfly
public void objectToStream(Object obj, DataOutput out) throws Exception {
Util.objectToStream(obj, out);
}
代码示例来源:origin: wildfly/wildfly
public void objectToStream(Object obj, DataOutput out) throws Exception {
Util.objectToStream(obj, out);
}
代码示例来源:origin: wildfly/wildfly
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);
}
代码示例来源:origin: wildfly/wildfly
public void getState(OutputStream ostream) throws Exception {
Util.objectToStream(stocks, new DataOutputStream(ostream));
}
代码示例来源:origin: wildfly/wildfly
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);
}
代码示例来源:origin: wildfly/wildfly
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);
}
}
代码示例来源:origin: wildfly/wildfly
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);
}
}
代码示例来源:origin: wildfly/wildfly
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);
}
}
代码示例来源:origin: wildfly/wildfly
public void getState(OutputStream output) throws Exception {
int[][] copy_of_state=canvas.getCopyOfState();
Util.objectToStream(copy_of_state, new DataOutputStream(output));
}
代码示例来源:origin: wildfly/wildfly
public void getState(OutputStream ostream) throws Exception {
Util.objectToStream(root.clone(), new DataOutputStream(ostream));
}
代码示例来源:origin: wildfly/wildfly
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);
}
}
代码示例来源:origin: wildfly/wildfly
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);
}
}
代码示例来源:origin: wildfly/wildfly
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();
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
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);
}
代码示例来源:origin: co.paralleluniverse/galaxy
@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));
}
}
代码示例来源:origin: org.axonframework/axon-distributed-commandbus
@Override
public void getState(OutputStream ostream) throws Exception {
Util.objectToStream(consistentHash.get(), new DataOutputStream(ostream));
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
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);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
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);
}
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
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();
}
内容来源于网络,如有侵权,请联系作者删除!