Code example for DataInput

Methods: readBooleanreadFully

0
  } 
   
  @Override 
  public void readFields(DataInput in) throws IOException {
    name = Text.readString(in);
    isBlacklisted = in.readBoolean();
    reasonForBlacklist = Text.readString(in);
    blacklistReport = Text.readString(in);
  } 
 
  @Override 
  public void write(DataOutput out) throws IOException {
    Text.writeString(out, name);
    out.writeBoolean(isBlacklisted);
    Text.writeString(out, reasonForBlacklist);
    Text.writeString(out, blacklistReport);
  } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE