PAJES 2.3.9

org.pajes.util
Class Base64Encoder

java.lang.Object
  extended byorg.pajes.util.Base64Encoder

public class Base64Encoder
extends java.lang.Object

Base64 encoding utility.


Method Summary
static java.lang.String encode(byte[] value, boolean suppressNewLines)
          Accepts a byte array and encodes it using Base64.
static java.lang.String encode(java.lang.String value)
          Accepts a String and encodes it using Base64.
static java.lang.String encode(java.lang.String value, boolean suppressNewLines)
          Accepts a String and encodes it using Base64, but offers the option not to break the resulting String into multiple lines.
static void main(java.lang.String[] args)
          Accepts a String argument from the command line and returns the Base64 encoded value to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

encode

public static java.lang.String encode(byte[] value,
                                      boolean suppressNewLines)
Accepts a byte array and encodes it using Base64.

Parameters:
value - the String to be encoded with Base64.
suppressNewLines - if true, no new line characters will be inserted or appended to the result array.
Returns:
the Base64 encoded array.

encode

public static java.lang.String encode(java.lang.String value)
Accepts a String and encodes it using Base64.

Parameters:
value - the String to be encoded with Base64.
Returns:
the Base64 encoded String.

encode

public static java.lang.String encode(java.lang.String value,
                                      boolean suppressNewLines)
Accepts a String and encodes it using Base64, but offers the option not to break the resulting String into multiple lines.

Parameters:
value - the String to be encoded with Base64.
suppressNewLines - if true, no new line characters will be inserted or appended to the result String.
Returns:
the Base64 encoded String.

main

public static void main(java.lang.String[] args)
Accepts a String argument from the command line and returns the Base64 encoded value to System.out.

Parameters:
args - the string to encode.

PAJES 2.3.9

Copyright © 2002-2003 Viridian Pty Limited. All Rights Reserved.