Class Overview
Utilities for encoding and decoding the Base64 representation of binary data.
Summary
Public Methods |
static
byte[]
|
decode(String input)
Decodes the Base64-encoded data in input and return the data in a new byte
array.
|
static
String
|
encode(byte[] input)
Base64 encodes the given data and return a newly allocated String with the
result.
|
static
String
|
encode(byte[] input, int offset, int len)
Base64 encodes the given data and return a newly allocated String with the
result.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
final
Class<?>
|
getClass()
Returns the runtime class of an object.
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long timeout, int nanos)
Causes current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or some other
thread interrupts the current thread, or a certain amount of real time has
elapsed.
|
final
void
|
wait(long timeout)
Causes current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a specified
amount of time has elapsed.
|
final
void
|
wait()
Causes current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public Constructors
Public Methods
public
static
byte[]
decode
(String input)
Decodes the Base64-encoded data in input and return the data in a new byte
array.
Parameters
input |
the input String to decode, which is converted to bytes using the
default charset |
Returns
- the data in a new byte array
public
static
String
encode
(byte[] input)
Base64 encodes the given data and return a newly allocated String with the
result.
Returns
- a newly allocated String with the result
public
static
String
encode
(byte[] input, int offset, int len)
Base64 encodes the given data and return a newly allocated String with the
result.
Parameters
input |
the data to encode |
offset |
the position within the input array at which to start |
len |
the number of bytes of input to encode |
Returns
- a newly allocated String with the result