Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

com.gentleware.services.util

Class Base64Codec

com.gentleware.services.util.Base64Codec

public class Base64Codec


Base64Codec can encode binary data to ASCII text and vice-versa using Base64 encoding.

See: http://www.javaworld.com/javaworld/javatips/jw-javatip36.html

Version:
1.0


 Attribute Summary
private static byte[]  _decodeMap
 
private static byte[]  _encodeMap
 
arrow_up
 

 Constructor Summary
private   Base64Codec()
 
arrow_up
 

 Method Summary
private static void   __initializer()
 
private static int   advancePos(byte[] byteData, int pos)
 
public static final byte[]   decode(String text)
 
public static final byte[]   decodeBytes(byte[] byteData)
 
public static final String   encode(byte[] byteData, boolean pad, int wrapColumns)
 
public static final String   encode(byte[] byteData)
 
public static final byte[]   encodeBytes(byte[] byteData)
 
private static void   insert(byte plain, byte code)
 
private static int   skipSpace(byte[] byteData, int pos)
 
arrow_up
 

Tagged Values
static false
gentleware-imported-line-number 11
gentleware-imported-package-statement-line-number 1
 

 Attribute Detail

_decodeMap

private static byte[] _decodeMap

arrow_up


_encodeMap

private static byte[] _encodeMap

arrow_up
 Constructor Detail

Base64Codec

private com.gentleware.services.util.Base64Codec Base64Codec()

Returns:
arrow_up
 Method Detail

__initializer

private static void __initializer()

arrow_up


advancePos

private static int advancePos(byte[] byteData, int pos)

Parameters:
byteData -
pos -
Returns:
arrow_up


decode

public static final byte[] decode(String text)

Parameters:
text -
Returns:
arrow_up


decodeBytes

public static final byte[] decodeBytes(byte[] byteData)

Parameters:
byteData -
Returns:
arrow_up


encode

public static final String encode(byte[] byteData, boolean pad, int wrapColumns)

Parameters:
byteData - the data to encode
pad - if false the result will NOT be padded with '=' characters to a length dividable by 4. This is not standard compliant.
wrapColumns - if > 0 the resulting string will have a line break '\n' inserted every wrapColumns characters
Returns:
the base64 encoded data
arrow_up


encode

public static final String encode(byte[] byteData)

Parameters:
byteData -
Returns:
arrow_up


encodeBytes

public static final byte[] encodeBytes(byte[] byteData)

Parameters:
byteData -
Returns:
arrow_up


insert

private static void insert(byte plain, byte code)

Parameters:
plain -
code -
arrow_up


skipSpace

private static int skipSpace(byte[] byteData, int pos)

Parameters:
byteData -
pos -
Returns:
arrow_up
Created  2004 - 12 - 1

    Poseidon for UMLTM
  UMLdoc
 PREV  CLASSIFIER    NEXT  CLASSIFIER     FRAMES    NO FRAMES      
SUMMARY:   INNER | ATTR | ASSOC | CONSTR | METHOD     DETAIL:   INNER | ATTR | ASSOC | CONSTR | METHOD     DIAGRAMS:   COLLAB | SEQ | STATE | ACTIV

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in Germany, USA and other countries. Copyright 2003-2004 Gentleware AG, Schanzenstr. 70, 20357 Hamburg, Germany. All Rights Reserved.

UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.