org.apache.directory.shared.ldap.util
Class Base64
java.lang.Object
org.apache.directory.shared.ldap.util.Base64
public class Base64
- extends Object
decoding of base64 characters to raw bytes.
- Version:
- $Revision: 434411 $
- Author:
- Apache Directory Project
Method Summary |
static byte[] |
decode(char[] a_data)
Decodes a BASE-64 encoded stream to recover the original data. |
static char[] |
encode(byte[] a_data)
passed data array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Base64
public Base64()
encode
public static char[] encode(byte[] a_data)
- passed data array.
- Parameters:
a_data
- the array of bytes to encode
- Returns:
- base64-coded character array.
decode
public static byte[] decode(char[] a_data)
- Decodes a BASE-64 encoded stream to recover the original data. White
space before and after will be trimmed away, but no other manipulation of
the input will be performed. As of version 1.2 this method will properly
handle input containing junk characters (newlines and the like) rather
than throwing an error. It does this by pre-parsing the input and
generating from that a count of VALID input characters.
- Parameters:
a_data
- data to decode.
- Returns:
- the decoded binary data.
Copyright © 2004-2012. All Rights Reserved.