public static String encode(byte[] bytes, int offset, int length) {
    if (length == 0) return "";

    StringBuilder builder = new StringBuilder();
    for (int i = offset; i < length; i += 3) {
      builder.append(encodeBlock(bytes, i));
    }
    return builder.toString();
  }
public static String encode(byte[] bytes, int offset, int length)