FileDocCategorySizeDatePackage
CheckedDataInput.javaAPI DocExample904Tue Dec 12 18:57:40 GMT 2000None

CheckedDataInput

public 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 ChecksumgetChecksum()

        return cksum;
    
public bytereadByte()

        byte b = in.readByte();
        cksum.update(b);
        return b;
    
public voidreadFully(byte[] b)

        in.readFully(b, 0, b.length);
        cksum.update(b, 0, b.length);
    
public voidreadFully(byte[] b, int off, int len)

        in.readFully(b, off, len);
        cksum.update(b, off, len);