| java.lang.Object |
| ↳ |
com.sforce.ws.util.Base64 |
Class Overview
Unceremoniously lifted from
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/Base64.java
Revision 1.8 2002/01/05 11:15:59
Eliminates dependency on sun.misc.Base64Encoding,
which isn't appreciated by the J2EE security manager.
(it's an access exception to load sun.misc.* classes
in application code).
Base64 encoder and decoder.
This class provides encoding/decoding methods for
the Base64 encoding as defined by RFC 2045,
N. Freed and N. Borenstein.
RFC 2045: Multipurpose Internet Mail Extensions (MIME)
Part One: Format of Internet Message Bodies. Reference
1996. Available at: http://www.ietf.org/rfc/rfc2045.txt
Summary
| Public Methods |
|
static
byte[]
|
decode(byte[] base64Data)
Decodes Base64 data into octects.
|
|
static
byte[]
|
encode(byte[] binaryData)
Encodes hex octects into Base64.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
Constants
private
static
final
int
BASELENGTH
Constant Value:
255
(0x000000ff)
private
static
final
int
EIGHTBIT
Constant Value:
8
(0x00000008)
private
static
final
int
FOURBYTE
Constant Value:
4
(0x00000004)
private
static
final
int
LOOKUPLENGTH
Constant Value:
64
(0x00000040)
private
static
final
byte
PAD
Constant Value:
61
(0x0000003d)
private
static
final
int
SIGN
Constant Value:
-128
(0xffffff80)
private
static
final
int
SIXTEENBIT
Constant Value:
16
(0x00000010)
private
static
final
int
TWENTYFOURBITGROUP
Constant Value:
24
(0x00000018)
Fields
private
static
final
byte[]
base64Alphabet
private
static
byte[]
lookUpBase64Alphabet
Public Constructors
Public Methods
public
static
byte[]
decode
(byte[] base64Data)
Decodes Base64 data into octects.
Parameters
| base64Data
| Byte array containing Base64 data |
Returns
- Array containing decoded data.
public
static
byte[]
encode
(byte[] binaryData)
Encodes hex octects into Base64.
Parameters
| binaryData
| Array containing binaryData |