CheckedDataInputpublic class CheckedDataInput extends Object
Fields Summary |
---|
private Checksum | cksum | private DataInput | in |
Constructors Summary |
---|
public CheckedDataInput(DataInput in, Checksum cksum)
this.cksum = cksum;
this.in = in;
|
Methods Summary |
---|
public Checksum | getChecksum()
return cksum;
| public byte | readByte()
byte b = in.readByte();
cksum.update(b);
return b;
| public void | readFully(byte[] b)
in.readFully(b, 0, b.length);
cksum.update(b, 0, b.length);
| public void | readFully(byte[] b, int off, int len)
in.readFully(b, off, len);
cksum.update(b, off, len);
|
|