Package com.groiss.util
Class Base64
java.lang.Object
com.groiss.util.Base64
Provides encoding of raw bytes to base64-encoded characters, and
decoding of base64 characters to raw bytes.
-
Method Summary
-
Method Details
-
encode
returns an array of base64-encoded characters to represent the passed data array.- Parameters:
data
- the array of bytes to encode- Returns:
- base64-coded character array.
-
decode
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. this method also properly handles 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.
-