org.firebirdsql.util

## Class ByteArrayHelper

- java.lang.Object
- - org.firebirdsql.util.ByteArrayHelper

-     public final class ByteArrayHelper
      extends java.lang.Object

  Helper methods for byte arrays.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `fromBase64String(java.lang.String base64)` Decodes a base64 encoded string to a byte array.
    `static java.lang.String` | `toHexString(byte[] bytes)` Converts the provided byte array to a hexadecimal string

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### toHexString

          public static java.lang.String toHexString(byte[] bytes)

      Converts the provided byte array to a hexadecimal string

      Adapted from http://stackoverflow.com/a/21429909/466862 by higginse

      Parameters:
        `bytes` - byte array (not `null`
      Returns:
        String with the content of the byte array in hexadecimal.

    - #### fromBase64String

          public static byte[] fromBase64String(java.lang.String base64)

      Decodes a base64 encoded string to a byte array.
      Parameters:
        `base64` - Base64 encoded data
      Returns:
        byte array after decoding

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.