The following are sample encoder/decoder in java.

class StringEncode implements Encoder<String> {
   private String encoding = null;
   public StringEncoder(VerifiableProperties props) {
    if(props == null)
      encoding = "UTF8";
    else
      encoding = props.getString("serializer.encoding", "UTF8");
  }

  public byte[] def toBytes(String s) {
    if(s == null)
      return null;
    else
      return s.getBytes(encoding);
  }
}

class StringDecoder implements Decoder<String> {
  private String encoding = null;
  public StringDecoder(VerifiableProperties props) {
    if(props == null)
      encoding = "UTF8";
    else
      encoding = props.getString("serializer.encoding", "UTF8");
  }

  public String fromBytes(byte bytes[]) {
    return new String(bytes, encoding);
  }
}
Thanks,

Jun
On Wed, May 1, 2013 at 12:33 PM, Chris Curtin <[EMAIL PROTECTED]>wrote:
 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB