Code example for DataOutput

Methods: write

0
    service.readFields(in);
  } 
 
  /** {@inheritDoc} */ 
  public void write(DataOutput out) throws IOException {
    WritableUtils.writeVInt(out, identifier.length);
    out.write(identifier);
    WritableUtils.writeVInt(out, password.length);
    out.write(password);
    kind.write(out);
    service.write(out);
  } 
 
  /** 
   * Generate a string with the url-quoted base64 encoded serialized form 
   * of the Writable. 
   * @param obj the object to serialize 
   * @return the encoded string 
   * @throws IOException 
   */ 
  private static String encodeWritable(Writable obj) throws IOException {