public static String encode(byte[] data){
  StringBuilder builder=new StringBuilder();
  for (int position=0; position < data.length; position+=3) {
    builder.append(encodeGroup(data,position));
  }
  return builder.toString();
}

public static String encode ( byte [ ] data ) { StringBuilder builder = new StringBuilder ( ) ; for ( int position = 0 ; position < data . length ; position += 3 ) { builder . append ( encodeGroup ( data , position ) ) ; } return builder . toString ( ) ; }
translates the specified byte array into base64 string .
