class Token implements Writable {

  private static String encodeWritable(Writable obj) throws IOException {
    DataOutputBuffer buf = new DataOutputBuffer();
    obj.write(buf);
    Base64 encoder = new Base64(0, null, true);
    byte[] raw = new byte[buf.getLength()];
    System.arraycopy(buf.getData(), 0, raw, 0, buf.getLength());
    return encoder.encodeToString(raw);
  }

  public  Token(T id, SecretManager<T> mgr);
  public  Token(byte[] identifier, byte[] password, Text kind, Text service);
  public  Token();
  public  Token(Token<T> other);
  public  Token(TokenProto tokenPB);

}