Code example for DataInput

Methods: readLong

0
    public static final int SIZEOF = Link.SIZEOF + 8;
     
    public final long capacity_bps;
     
    public LinkSpec(DataInput in) throws IOException {
        super(in);
        this.capacity_bps = in.readLong();
    } 
     
    public void write(DataOutput out) throws IOException {
        super.write(out);
        out.writeLong(capacity_bps);
    } 
     
    public String toString() {
        return super.toString() + ":" + capacity_bps + "bps";
    } 
 
    public int hashCode() { 
        return super.hashCode() + 31*(int)capacity_bps;
    }