class HexEncoder {
    private static final char[] hexArray = "0123456789ABCDEF".toCharArray();

    /**
     * Converts given binary data to a hexadecimal string representation.
     *
     * @param data Binary data
     * @return Hexadecimal representation
     */
    public static String encode(byte[] data) {<FILL_FUNCTION_BODY>}
  }

      final char[] hexChars = new char[data.length * 2];

      int position = 0;
      for (byte bt : data) {
        hexChars[position++] = hexArray[(bt & 0xF0) >>> 4];
        hexChars[position++] = hexArray[bt & 0x0F];
      }

      return String.valueOf(hexChars);
    
<no_super_class>