Code example for DataOutput

Methods: writeFloat, writeInt

0
  public void read(ByteBuffer buffer) {
    flag = buffer.getInt();
    volume = buffer.getFloat();
  } 
  public void write(DataOutput buffer) throws IOException {
    buffer.writeInt(flag);
    buffer.writeFloat(volume);
  } 
  public Object setmyarray(Object array) {
    myarray = (bSameVolumeConstraint[])array;
    return this;
  } 
  public Object getmyarray() {
    return myarray;
  } 
  public String toString() {
    StringBuilder sb = new StringBuilder("bSameVolumeConstraint:\n");
    sb.append("  flag: ").append(flag).append("\n");
    sb.append("  volume: ").append(volume).append("\n");
    return sb.toString();
  }