@@ -0,0 +1,1067 @@
+package me.prettyprint.cassandra.utils;%0A%0Aimport java.io.UnsupportedEncodingException;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A/**%0A * Encoding and decoding utilities.%0A *%0A * @author Ran Tavory (rantav@gmail.com)%0A *%0A */%0Apublic class StringUtils %7B%0A%0A  private static final Logger log = LoggerFactory.getLogger(StringUtils.class);%0A%0A  public static final String ENCODING = %22utf-8%22;%0A%0A  /**%0A   * Gets UTF-8 bytes from the string.%0A   *%0A   * @param s%0A   * @return%0A   */%0A  public static byte%5B%5D bytes(String s) %7B%0A    try %7B%0A      return s.getBytes(ENCODING);%0A    %7D catch (UnsupportedEncodingException e) %7B%0A      log.error(%22UnsupportedEncodingException %22, e);%0A      throw new RuntimeException(e);%0A    %7D%0A  %7D%0A%0A  /**%0A   * Utility for converting bytes to strings. UTF-8 is assumed.%0A   * @param bytes%0A   * @return%0A   */%0A  public static String string(byte%5B%5D bytes) %7B%0A    try %7B%0A      return new String(bytes, ENCODING);%0A    %7D catch (UnsupportedEncodingException e) %7B%0A      log.error(%22UnsupportedEncodingException %22, e);%0A      throw new RuntimeException(e);%0A    %7D%0A  %7D%0A%0A%7D%0A

Add StringUtils class for easy string encoding/decoding