OpenShift Java Client 2.5.0.Final

com.openshift.client.utils
Class Base64Coder

java.lang.Object
  extended by com.openshift.client.utils.Base64Coder

public class Base64Coder
extends Object

A utility class that offers methods to encode and decode strings from and to base64

Author:
Andre Dietisheim

Method Summary
static String decode(byte[] encoded)
           
static String decode(String encoded)
          Decodes the given base64 encoded string.
static String encode(byte[] unencoded)
          Encodes the given byte array to a base64 encoded String
static String encode(String unencoded)
          Encodes the given string to a base64 encoded string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static String encode(byte[] unencoded)
Encodes the given byte array to a base64 encoded String

Parameters:
unencoded - the array of unencoded bytes that shall get encoded
Returns:
the encoded string

encode

public static String encode(String unencoded)
Encodes the given string to a base64 encoded string. Returns null if the given string is null.

Parameters:
unencoded -
Returns:

decode

public static String decode(byte[] encoded)

decode

public static String decode(String encoded)
Decodes the given base64 encoded string. Returns null if the given string is null.

Parameters:
encoded - the base64 encoded string
Returns:
the decoded string

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.