org.exist.util
Class Base64Decoder
java.lang.Object
org.exist.util.Base64Decoder
public final class Base64Decoder
- extends Object
Base 64 text to byte decoder. To produce the binary array from
base 64 encoding call translate(java.lang.CharSequence)
for each sequence of
characters and getByteArray()
to mark closure of the
character stream and retrieve the binary contents.
- Author:
- Based on code from the Mozilla Directory SDK
Base64Decoder
public Base64Decoder()
translate
public final void translate(CharSequence str)
throws IllegalArgumentException
- Decode the base 64 string into a byte array (which can subsequently be accessed using getByteArray()
- Parameters:
str
- the base 64 string
- Throws:
IllegalArgumentException
- if the base64 string is incorrectly formatted
getByteArray
public byte[] getByteArray()
reset
public void reset()
Copyright (C) Wolfgang Meier. All rights reserved.