com.gridsystems
Class Base64Utils

java.lang.Object
  extended by com.gridsystems.Base64Utils

public final class Base64Utils
extends java.lang.Object

Common methods used within both the encoder and the decoder classes.

Author:
rruiz

Method Summary
static byte[] toByteArray(java.lang.String s)
          Returns a byte array representing the contents of the given string, applying a UTF-8 encoding.
static java.lang.String toString(byte[] bytes)
          Returns a String representing the contents of the given byte array, applying a UTF-8 decoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toByteArray

public static byte[] toByteArray(java.lang.String s)
Returns a byte array representing the contents of the given string, applying a UTF-8 encoding.

Parameters:
s - the string for which we want to obtain its internal byte array
Returns:
the string contents

toString

public static java.lang.String toString(byte[] bytes)
Returns a String representing the contents of the given byte array, applying a UTF-8 decoding.

Parameters:
bytes - the string in byte array format
Returns:
the string contents


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.