Code example for DataInput

Methods: readFully, readInt, readLong

0
  /** {@inheritDoc} */  
  public byte[] getBytes() { 
    return WritableUtils.toByteArray(this);
  } 
 
  /** {@inheritDoc} */  
  public void readFields(DataInput in) throws IOException {
    bytesPerCRC = in.readInt();
    crcPerBlock = in.readLong();
    md5 = MD5Hash.read(in);
  } 
 
  /** {@inheritDoc} */  
  public void write(DataOutput out) throws IOException {
    out.writeInt(bytesPerCRC);
    out.writeLong(crcPerBlock);
    md5.write(out);    
  } 
 
  /** Write that object to xml output. */ 
  public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that