Code example for DataOutput

Methods: writeBoolean

   * Write the binary representation of the counter 
  public synchronized void write(DataOutput out) throws IOException {
    Text.writeString(out, name);
    boolean distinctDisplayName = ! name.equals(displayName);
    if (distinctDisplayName) {
      Text.writeString(out, displayName);
    WritableUtils.writeVLong(out, value);
  public synchronized String getName() {
    return name;
   * Get the name of the counter. 
Connect your IDE to all the code out there  Get Codota for Java