Code example for DataInput

Methods: readFullyreadIntreadLongreadUTF

  private byte [] column;
  private byte [] value;
  public void readFields(DataInput din) throws IOException {
    columnFamily = din.readUTF();
    timeStamp = din.readLong();
    int clength= din.readInt();
    column = new byte[clength];
    din.readFully(column, 0, clength);
    int vlength = din.readInt();
    value = new byte [vlength ];
    din.readFully( value, 0 , vlength);
  public void write(DataOutput out) throws IOException {
    out.writeInt( column.length );
Connect your IDE to all the code out there  Get Codota for Java