org.jgroups.util.Util.objectFromStream()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(206)

本文整理了Java中org.jgroups.util.Util.objectFromStream()方法的一些代码示例,展示了Util.objectFromStream()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.objectFromStream()方法的具体详情如下:
包路径:org.jgroups.util.Util
类名称:Util
方法名:objectFromStream

Util.objectFromStream介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

public Object objectFromStream(DataInput in) throws Exception {
    return Util.objectFromStream(in);
  }
}

代码示例来源:origin: wildfly/wildfly

public Object objectFromStream(DataInput in) throws Exception {
  return Util.objectFromStream(in);
}

代码示例来源:origin: wildfly/wildfly

public Object objectFromStream(DataInput in) throws Exception {
    return Util.objectFromStream(in);
  }
}

代码示例来源:origin: wildfly/wildfly

public static <T extends Object> T objectFromStream(DataInput in) throws Exception {
  return objectFromStream(in, null);
}

代码示例来源:origin: wildfly/wildfly

protected void readTypes(DataInput in) throws Exception {
  int types_len=in.readByte();
  if(types_len > 0) {
    types=new Class<?>[types_len];
    for(int i=0; i < types_len; i++)
      types[i]=Util.objectFromStream(in);
  }
}

代码示例来源:origin: wildfly/wildfly

public Object objectFromStream(DataInput in) throws Exception {
  byte type=in.readByte();
  if(type == NULL)
    return null;
  if(type == VALUE) {
    long expiration_time=in.readLong();
    Object obj=Util.objectFromStream(in);
    return new Cache.Value(obj, expiration_time);
  }
  else
    return Util.objectFromStream(in);
}

代码示例来源:origin: wildfly/wildfly

public Object objectFromStream(DataInput in) throws Exception {
    byte type=in.readByte();
    if(type == NULL)
      return null;
    if(type == VALUE) {
      long expiration_time=in.readLong();
      Object obj=Util.objectFromStream(in);
      return new Cache.Value(obj, expiration_time);
    }
    return Util.objectFromStream(in);
  }
}

代码示例来源:origin: wildfly/wildfly

protected void readMethod(DataInput in) throws Exception {
  if(in.readByte() == 1) {
    Class[] parametertypes=Util.objectFromStream(in);
    Class   declaringclass=Util.objectFromStream(in);
    try {
      method=declaringclass.getDeclaredMethod(method_name, parametertypes);
    }
    catch(NoSuchMethodException e) {
      throw new IOException(e.toString());
    }
  }
}

代码示例来源:origin: wildfly/wildfly

protected void readArgs(DataInput in, Marshaller marshaller) throws Exception {
  int args_len=in.readByte();
  if(args_len == 0)
    return;
  args=new Object[args_len];
  for(int i=0; i < args_len; i++)
    args[i]=marshaller != null? marshaller.objectFromStream(in) : Util.objectFromStream(in);
}

代码示例来源:origin: wildfly/wildfly

public void readFrom(DataInput in) throws Exception {
  int size=in.readInt();
  for(int i=0; i < size; i++) {
    String key=Bits.readString(in);
    Object value=Util.objectFromStream(in);
    if(key == null)
      continue;
    values.put(key, value);
  }
}

代码示例来源:origin: wildfly/wildfly

public void setState(InputStream input) throws Exception {
  java.util.List<Node> copy=(List<Node>)Util.objectFromStream(new DataInputStream(input));
  synchronized(nodes) {
    nodes.clear();
    nodes.addAll(copy);
  }
  repaint();
}

代码示例来源:origin: wildfly/wildfly

public void setState(InputStream input) throws Exception {
  canvas.setState(Util.objectFromStream(new DataInputStream(input)));
}

代码示例来源:origin: wildfly/wildfly

public void setState(InputStream istream) throws Exception {
  integrate((HashMap<String, Float>)Util.objectFromStream(new DataInputStream(istream)));
}

代码示例来源:origin: wildfly/wildfly

public void setState(InputStream istream) throws Exception {
  Object obj=Util.objectFromStream(new DataInputStream(istream));
  root=(Node)((Node)obj).clone();
  notifyAllNodesCreated(root);
}

代码示例来源:origin: wildfly/wildfly

protected static Object replyFromBuffer(final byte[] buf, int offset, int length, Marshaller marshaller) throws Exception {
  ByteArrayDataInputStream in=new ByteArrayDataInputStream(buf, offset, length);
  return marshaller != null? marshaller.objectFromStream(in) : Util.objectFromStream(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected void readTypes(DataInput in) throws Exception {
  int types_len=in.readByte();
  if(types_len > 0) {
    types=new Class<?>[types_len];
    for(int i=0; i < types_len; i++)
      types[i]=Util.objectFromStream(in);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public Object objectFromStream(DataInput in) throws Exception {
  byte type=in.readByte();
  if(type == NULL)
    return null;
  if(type == VALUE) {
    long expiration_time=in.readLong();
    Object obj=Util.objectFromStream(in);
    return new Cache.Value(obj, expiration_time);
  }
  else
    return Util.objectFromStream(in);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected void readMethod(DataInput in) throws Exception {
  if(in.readByte() == 1) {
    Class[] parametertypes=Util.objectFromStream(in);
    Class   declaringclass=Util.objectFromStream(in);
    try {
      method=declaringclass.getDeclaredMethod(method_name, parametertypes);
    }
    catch(NoSuchMethodException e) {
      throw new IOException(e.toString());
    }
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

public void readFrom(DataInput in) throws Exception {
  int size=in.readInt();
  for(int i=0; i < size; i++) {
    String key=Bits.readString(in);
    Object value=Util.objectFromStream(in);
    if(key == null)
      continue;
    values.put(key, value);
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

protected void readArgs(DataInput in, Marshaller marshaller) throws Exception {
  int args_len=in.readByte();
  if(args_len == 0)
    return;
  args=new Object[args_len];
  for(int i=0; i < args_len; i++)
    args[i]=marshaller != null? marshaller.objectFromStream(in) : Util.objectFromStream(in);
}

相关文章

Util类方法