com.sshtools.j2ssh.util
Class Base64

java.lang.Object
  extended by com.sshtools.j2ssh.util.Base64

public class Base64
extends java.lang.Object

Version:
$Revision: 1.1 $
Author:
$author$

Nested Class Summary
static class Base64.InputStream
           
static class Base64.OutputStream
           
 
Field Summary
private static byte[] ALPHABET
           
private static byte BAD_ENCODING
           
private static byte[] DECODABET
           
static boolean DECODE
           
static boolean ENCODE
           
private static byte EQUALS_SIGN
           
private static byte EQUALS_SIGN_ENC
           
private static int MAX_LINE_LENGTH
           
private static byte NEW_LINE
           
private static byte white_SPACE_ENC
           
 
Constructor Summary
private Base64()
           
 
Method Summary
static byte[] decode(byte[] source, int off, int len)
           
static byte[] decode(java.lang.String s)
           
private static byte[] decode4to3(byte[] fourBytes)
           
private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset)
           
static java.lang.Object decodeToObject(java.lang.String encodedObject)
           
static java.lang.String decodeToString(java.lang.String s)
           
private static byte[] encode3to4(byte[] threeBytes)
           
private static byte[] encode3to4(byte[] threeBytes, int numSigBytes)
           
private static byte[] encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset)
           
static java.lang.String encodeBytes(byte[] source, boolean ignoreMaxLineLength)
           
static java.lang.String encodeBytes(byte[] source, int off, int len, boolean ignoreMaxLineLength)
           
static java.lang.String encodeObject(java.io.Serializable serializableObject)
           
static java.lang.String encodeString(java.lang.String s, boolean ignoreMaxLineLength)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODE

public static final boolean ENCODE
See Also:
Constant Field Values

DECODE

public static final boolean DECODE
See Also:
Constant Field Values

MAX_LINE_LENGTH

private static final int MAX_LINE_LENGTH
See Also:
Constant Field Values

EQUALS_SIGN

private static final byte EQUALS_SIGN
See Also:
Constant Field Values

NEW_LINE

private static final byte NEW_LINE
See Also:
Constant Field Values

ALPHABET

private static final byte[] ALPHABET

DECODABET

private static final byte[] DECODABET

BAD_ENCODING

private static final byte BAD_ENCODING
See Also:
Constant Field Values

white_SPACE_ENC

private static final byte white_SPACE_ENC
See Also:
Constant Field Values

EQUALS_SIGN_ENC

private static final byte EQUALS_SIGN_ENC
See Also:
Constant Field Values
Constructor Detail

Base64

private Base64()
Method Detail

decode

public static byte[] decode(java.lang.String s)
Parameters:
s -
Returns:

decode

public static byte[] decode(byte[] source,
                            int off,
                            int len)

decodeToObject

public static java.lang.Object decodeToObject(java.lang.String encodedObject)

decodeToString

public static java.lang.String decodeToString(java.lang.String s)

encodeBytes

public static java.lang.String encodeBytes(byte[] source,
                                           boolean ignoreMaxLineLength)

encodeBytes

public static java.lang.String encodeBytes(byte[] source,
                                           int off,
                                           int len,
                                           boolean ignoreMaxLineLength)

encodeObject

public static java.lang.String encodeObject(java.io.Serializable serializableObject)

encodeString

public static java.lang.String encodeString(java.lang.String s,
                                            boolean ignoreMaxLineLength)

main

public static void main(java.lang.String[] args)

decode4to3

private static byte[] decode4to3(byte[] fourBytes)

decode4to3

private static int decode4to3(byte[] source,
                              int srcOffset,
                              byte[] destination,
                              int destOffset)

encode3to4

private static byte[] encode3to4(byte[] threeBytes)

encode3to4

private static byte[] encode3to4(byte[] threeBytes,
                                 int numSigBytes)

encode3to4

private static byte[] encode3to4(byte[] source,
                                 int srcOffset,
                                 int numSigBytes,
                                 byte[] destination,
                                 int destOffset)