public static String byteArrayToString(byte[] bytes){
  char chars[]=new char[bytes.length];
  for (int i=0; i < bytes.length; i++) {
    chars[i]=(char)bytes[i];
  }
  return new String(chars);
}

public static String byteArrayToString ( byte [ ] bytes ) { char chars [ ] = new char [ bytes . length ] ; for ( int i = 0 ; i < bytes . length ; i ++ ) { chars [ i ] = ( char ) bytes [ i ] ; } return new String ( chars ) ; }
converts byte array to string .
