guarana.toolkit.task.streamdealers.codecs
Class Base64Codec

java.lang.Object
  extended by guarana.toolkit.task.streamdealers.codecs.Base64Codec
All Implemented Interfaces:
ICodec

public class Base64Codec
extends Object
implements ICodec

A Base64 codec implementation.

Since:
Guaranį SDK 1.0.0
Author:
Rafael Z. Frantz

Constructor Summary
Base64Codec()
          Constructs a new Base64 codec.
 
Method Summary
 byte[] decode(byte[] data)
          Decodes a byte[] containing characters in the Base64 alphabet.
 byte[] encode(byte[] data)
          Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Base64Codec

public Base64Codec()
Constructs a new Base64 codec.

Method Detail

decode

public byte[] decode(byte[] data)
              throws CodecException
Decodes a byte[] containing characters in the Base64 alphabet.

Specified by:
decode in interface ICodec
Parameters:
data - A byte array containing Base64 character data.
Returns:
A byte array containing binary decoded data.
Throws:
CodecException - if this method cannot encode the data.
See Also:
ICodec.decode(byte[])

encode

public byte[] encode(byte[] data)
              throws CodecException
Encodes a byte[] containing binary data, into a byte[] containing characters in the Base64 alphabet.

Specified by:
encode in interface ICodec
Parameters:
data - A byte array containing binary data.
Returns:
A byte array containing only Base64 character encoded data.
Throws:
CodecException - if this method cannot encode the data.
See Also:
ICodec.encode(byte[])


Guaranį DSL Home