Code example for DataOutput

Methods: writeLong

0
        start = input.readLong();
        end = input.readLong();
    } 
 
    public void write(DataOutput output) throws IOException {
        output.writeLong(start);
        output.writeLong(end);
    } 
 
    @Override 
    public String toString() {
        return String.format("Split at [%s to %s]", this.start, this.end == Long.MAX_VALUE ? "END" : this.end - 1);
    } 
}