Framework Professional Edition Package


com.prosyst.util.encode
Class Base64

java.lang.Object
  extended by com.prosyst.util.encode.Base64

public class Base64
extends java.lang.Object


Field Summary
static byte[] codes
          Auxiliary array containing int values of chars.
 
Constructor Summary
Base64()
           
 
Method Summary
static byte[] decode(byte[] data)
           
static byte[] decode(byte[] b_in, int off, int length)
          Decodes Base64 encoded data.
static byte[] encode(byte[] b_in)
          Encodes byte array.
static byte[] encode(byte[] b_in, int CHARS_PER_LINE)
           
static byte[] encode(byte[] b_in, int off, int length)
           
static byte[] encode(byte[] b_in, int off1, int length, int CHARS_PER_LINE)
          Encodes byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codes

public static byte[] codes
Auxiliary array containing int values of chars.

Constructor Detail

Base64

public Base64()
Method Detail

encode

public static byte[] encode(byte[] b_in)
Encodes byte array. Result is with 76 simbols per line.

Parameters:
b_in - byte array data for encoding.
Returns:
encoded data.

encode

public static byte[] encode(byte[] b_in,
                            int off,
                            int length)

encode

public static byte[] encode(byte[] b_in,
                            int CHARS_PER_LINE)

encode

public static byte[] encode(byte[] b_in,
                            int off1,
                            int length,
                            int CHARS_PER_LINE)
Encodes byte array. Result is with CHARS_PER_LINE simbols per line.

Parameters:
b_in - byte array data for encoding.
CHARS_PER_LINE - chars per line in output.
Returns:
encoded data.

decode

public static byte[] decode(byte[] data)
                     throws java.lang.Exception
Throws:
java.lang.Exception

decode

public static byte[] decode(byte[] b_in,
                            int off,
                            int length)
                     throws java.lang.Exception
Decodes Base64 encoded data.

Parameters:
b_in - encoded data.
Returns:
decoded data.
Throws:
when - data is not in correct Base64 format.
java.lang.Exception

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved