public static byte[] copyFromUtf8(final String text){
  try {
    return text.getBytes("UTF-8");
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException("UTF-8 not supported?");
  }
}

public static byte [ ] copyFromUtf8 ( final String text ) { try { return text . getBytes ( "UTF-8" ) ; } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( "UTF-8 not supported?" ) ; } }
helper function to convert a string into utf - 8 while turning the unsupportedencodingexception to a runtimeexception .
