FileDocCategorySizeDatePackage
CheckedDataOutput.javaAPI DocExample873Tue Dec 12 18:57:40 GMT 2000None

CheckedDataOutput

public class CheckedDataOutput extends Object

Fields Summary
private Checksum
cksum
private DataOutput
out
Constructors Summary
public CheckedDataOutput(DataOutput out, Checksum cksum)

        this.cksum = cksum;
        this.out = out;
    
Methods Summary
public ChecksumgetChecksum()

        return cksum;
    
public voidwrite(int b)

        out.write(b);
        cksum.update(b);
    
public voidwrite(byte[] b)

        out.write(b, 0, b.length);
        cksum.update(b, 0, b.length);
    
public voidwrite(byte[] b, int off, int len)

        out.write(b, off, len);
        cksum.update(b, off, len);