org.apache.accumulo.core.util
Class Base64

java.lang.Object
  extended by org.apache.accumulo.core.util.Base64

public final class Base64
extends Object

A wrapper around commons-codec's Base64 to make sure we get the non-chunked behavior that became the default in commons-codec version 1.5+ while relying on the commons-codec version 1.4 that Hadoop Client provides.


Method Summary
static byte[] decodeBase64(byte[] base64)
          Decode, presuming bytes are base64.
static byte[] decodeBase64(String base64String)
          Decode, presuming String is base64.
static byte[] encodeBase64(byte[] data)
          Serialize to Base64 byte array, non-chunked.
static String encodeBase64String(byte[] data)
          Serialize to Base64 as a String, non-chunked.
static String encodeBase64URLSafeString(byte[] data)
          Serialize to Base64 as a String using the URLSafe alphabet, non-chunked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encodeBase64

public static byte[] encodeBase64(byte[] data)
Serialize to Base64 byte array, non-chunked.


encodeBase64String

public static String encodeBase64String(byte[] data)
Serialize to Base64 as a String, non-chunked.


encodeBase64URLSafeString

public static String encodeBase64URLSafeString(byte[] data)
Serialize to Base64 as a String using the URLSafe alphabet, non-chunked. The URLSafe alphabet uses - instead of + and _ instead of /.


decodeBase64

public static byte[] decodeBase64(byte[] base64)
Decode, presuming bytes are base64. Transparently handles either the standard alphabet or the URL Safe one.


decodeBase64

public static byte[] decodeBase64(String base64String)
Decode, presuming String is base64. Transparently handles either the standard alphabet or the URL Safe one.



Copyright © 2015 Apache Accumulo Project. All rights reserved.