org.springframework.security.core.codec
Class Base64

java.lang.Object
  extended by org.springframework.security.core.codec.Base64

public final class Base64
extends Object

Base64 encoder which is a reduced version of Robert Harder's public domain implementation. See http://iharder.net/base64 for more information.

For internal use only.

Since:
3.0
Version:
$Id$
Author:
Luke Taylor

Field Summary
static int DECODE
          Specify decoding in first bit.
static int DO_BREAK_LINES
          Do break lines when encoding.
static int ENCODE
          Specify encoding in first bit.
static int NO_OPTIONS
          No options specified.
static int ORDERED
          Encode using the special "ordered" dialect of Base64 described here: http://www.faqs.org/qa/rfcc-1940.html.
static int URL_SAFE
          Encode using Base64-like encoding that is URL- and Filename-safe as described in Section 4 of RFC3548: http://www.faqs.org/rfcs/rfc3548.html.
 
Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(byte[] bytes)
           
static byte[] encode(byte[] bytes)
           
static boolean isBase64(byte[] bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_OPTIONS

public static final int NO_OPTIONS
No options specified. Value is zero.

See Also:
Constant Field Values

ENCODE

public static final int ENCODE
Specify encoding in first bit. Value is one.

See Also:
Constant Field Values

DECODE

public static final int DECODE
Specify decoding in first bit. Value is zero.

See Also:
Constant Field Values

DO_BREAK_LINES

public static final int DO_BREAK_LINES
Do break lines when encoding. Value is 8.

See Also:
Constant Field Values

URL_SAFE

public static final int URL_SAFE
Encode using Base64-like encoding that is URL- and Filename-safe as described in Section 4 of RFC3548: http://www.faqs.org/rfcs/rfc3548.html. It is important to note that data encoded this way is not officially valid Base64, or at the very least should not be called Base64 without also specifying that is was encoded using the URL- and Filename-safe dialect.

See Also:
Constant Field Values

ORDERED

public static final int ORDERED
Encode using the special "ordered" dialect of Base64 described here: http://www.faqs.org/qa/rfcc-1940.html.

See Also:
Constant Field Values
Constructor Detail

Base64

public Base64()
Method Detail

decode

public static byte[] decode(byte[] bytes)

encode

public static byte[] encode(byte[] bytes)

isBase64

public static boolean isBase64(byte[] bytes)


Copyright © 2004-2009 SpringSource, Inc. All Rights Reserved.