com.softwareag.tamino.db.api.invocation
Class TBase64EncodingStrategy

java.lang.Object
  extended by com.softwareag.tamino.db.api.invocation.TBase64EncodingStrategy
All Implemented Interfaces:
TEncodingStrategy

public class TBase64EncodingStrategy
extends java.lang.Object
implements TEncodingStrategy

TBase64EncodingStrategy implements an encoding strategy for base64 which is the most common used encoding for userid, password submission.

Version:
$Revision: 1.3 $
Author:
Marcus Schreyer

Constructor Summary
protected TBase64EncodingStrategy()
          This class isn't meant to be instantiated.
 
Method Summary
 byte[] decode(byte[] data)
          This method decodes the given byte[] using the base64-encoding specified in RFC-2045 (Section 6.8).
 java.lang.String decode(java.lang.String str)
          This method decodes the given string using the base64-encoding specified in RFC-2045 (Section 6.8).
 byte[] encode(byte[] data)
          This method encodes the given byte[] using the base64-encoding specified in RFC-2045 (Section 6.8).
 java.lang.String encode(java.lang.String str)
          This method encodes the given string using the base64-encoding specified in RFC-2045 (Section 6.8).
static TBase64EncodingStrategy getInstance()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TBase64EncodingStrategy

protected TBase64EncodingStrategy()
This class isn't meant to be instantiated.

Method Detail

getInstance

public static TBase64EncodingStrategy getInstance()

encode

public java.lang.String encode(java.lang.String str)
This method encodes the given string using the base64-encoding specified in RFC-2045 (Section 6.8). It's used for example in the "Basic" authorization scheme.

Specified by:
encode in interface TEncodingStrategy
Parameters:
str - the string
Returns:
the base64-encoded str

encode

public byte[] encode(byte[] data)
This method encodes the given byte[] using the base64-encoding specified in RFC-2045 (Section 6.8).

Specified by:
encode in interface TEncodingStrategy
Parameters:
data - the data
Returns:
the base64-encoded data

decode

public java.lang.String decode(java.lang.String str)
This method decodes the given string using the base64-encoding specified in RFC-2045 (Section 6.8).

Specified by:
decode in interface TEncodingStrategy
Parameters:
str - the base64-encoded string.
Returns:
the decoded str.

decode

public byte[] decode(byte[] data)
This method decodes the given byte[] using the base64-encoding specified in RFC-2045 (Section 6.8).

Specified by:
decode in interface TEncodingStrategy
Parameters:
data - the base64-encoded data.
Returns:
the decoded data.


Copyright (c) 2013 Software AG. All Rights Reserved.