Code example for DataInput

Methods: readBoolean

0
    return hint;
  } 
 
  @Override 
  public void readFields(DataInput input) throws IOException {
    super.readFields(input);
    boolean hintExists = input.readBoolean();
    if (hintExists) {
      hint = new RangeSplitHint<I>();
      hint.readFields(input);
    } else { 
      hint = null;
    } 
  } 
 
  @Override 
  public void write(DataOutput output) throws IOException {
    super.write(output);
    output.writeBoolean(hint != null);
    if (hint != null) {
      hint.write(output);