guarana.toolkit.task.streamdealers.codecs
Class URLCodec

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

public class URLCodec
extends Object
implements ICodec

An URL codec implementation.

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

Constructor Summary
URLCodec(String charset)
          Constructs a new URL codec using the given charset.
 
Method Summary
 byte[] decode(byte[] data)
          Decodes a byte[] that represents an encoded URL.
 byte[] encode(byte[] data)
          Encodes a byte[] that represents an URL.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLCodec

public URLCodec(String charset)
Constructs a new URL codec using the given charset.

Parameters:
charset - The charset to be used.
See Also:
CharEncoding
Method Detail

decode

public byte[] decode(byte[] data)
              throws CodecException
Decodes a byte[] that represents an encoded URL.

Specified by:
decode in interface ICodec
Parameters:
data - A byte array to be decoded.
Returns:
A byte array with decoded data.
Throws:
CodecException - if this method cannot decode the byte[].
See Also:
ICodec.decode(byte[])

encode

public byte[] encode(byte[] data)
              throws CodecException
Encodes a byte[] that represents an URL.

Specified by:
encode in interface ICodec
Parameters:
data - A byte array to be encoded.
Returns:
A byte array with encoded data.
Throws:
CodecException - if this method cannot decode the byte[].
See Also:
ICodec.encode(byte[])


Guaranį DSL Home