コード例 #1
0
  @Override
  public char[] deserialize(char[] reuse, DataInputView source) throws IOException {
    final int len = source.readInt();
    reuse = new char[len];

    for (int i = 0; i < len; i++) {
      reuse[i] = source.readChar();
    }

    return reuse;
  }
コード例 #2
0
 @Override
 public void copy(DataInputView source, DataOutputView target) throws IOException {
   final int len = source.readInt();
   target.writeInt(len);
   target.write(source, len * 2);
 }