|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.crypt.Base64UrlSafe
public class Base64UrlSafe
Provides Base64 encoding and decoding with URL and filename safe alphabet as defined by RFC 3548, section 4.
This Base64 encoder is modified to meet URL requirements. The changes are: '+' => '*', '/' => '-', and no padding. This class is taken from the Apache commons-codec, and adjusted to fit the Wicket framework's needs, especially external dependencies have been removed. This class implements section 4. Base 64 Encoding with URL and Filename Safe Alphabet from RFC 3548 The Base16, Base32, and Base64 Data Encodings by Simon Josefsson.
Constructor Summary | |
---|---|
Base64UrlSafe()
|
Method Summary | |
---|---|
byte[] |
decode(byte[] pArray)
Decodes a byte[] containing containing characters in the Base64 alphabet. |
Object |
decode(Object pObject)
Decodes an Object using the base64 algorithm. |
static byte[] |
decodeBase64(byte[] base64Data)
Decodes Base64 data into octets |
byte[] |
encode(byte[] pArray)
Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet. |
Object |
encode(Object pObject)
Encodes an Object using the base64 algorithm. |
static byte[] |
encodeBase64(byte[] binaryData)
Encodes binary data using the base64 algorithm. |
static boolean |
isArrayByteBase64(byte[] arrayOctect)
Tests a given byte array to see if it contains only valid characters within the Base64 alphabet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Base64UrlSafe()
Method Detail |
---|
public static boolean isArrayByteBase64(byte[] arrayOctect)
arrayOctect
- byte array to test
true
if all bytes are valid characters in the Base64 alphabet or if the
byte array is empty; false, otherwisepublic Object decode(Object pObject)
pObject
- Object to decode
IllegalArgumentException
- if the parameter supplied is not of type byte[]public byte[] decode(byte[] pArray)
pArray
- A byte array containing Base64 character data
public static byte[] encodeBase64(byte[] binaryData)
binaryData
- Array containing binary data to encode.
public static byte[] decodeBase64(byte[] base64Data)
base64Data
- Byte array containing Base64 data
public Object encode(Object pObject)
pObject
- Object to encode
IllegalArgumentException
- if the parameter supplied is not of type byte[]public byte[] encode(byte[] pArray)
pArray
- a byte array containing binary data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |