Code example for DataInput

Methods: readFullyreadIntreadLong

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. */ 
Experience pair programming with AI  Get Codota for Java