de.uplanet.lucy.server.auxiliaries
Class Codec

java.lang.Object
  extended by de.uplanet.lucy.server.auxiliaries.Codec

@VelocityCallable(value="singleton")
public class Codec
extends java.lang.Object

Encoder/decoder utility class for use in the Velocity context.

Version:
$Revision: 65365 $

Constructor Summary
Codec()
          Construct the object.
 
Method Summary
 java.lang.String hexDecodeString(java.lang.String p_str)
          Decode a hex string to string, using the default character encoding, i.e, UTF-8.
 java.lang.String hexDecodeString(java.lang.String p_str, java.lang.String p_strCharset)
          Decode a hex string to string, using the specified character encoding.
 java.lang.String hexEncodeString(java.lang.String p_str, java.lang.String p_strCharset)
          Encode a string to it's hex representation, using the default character encoding, i.e, UTF-8.
 java.lang.String quotedPrintableDecodeString(java.lang.String p_str, java.lang.String p_strCharset)
          Decode a quoted printable encoded string, using the specified character encoding.
 java.lang.String quotedPrintableEncodeString(java.lang.String p_str, java.lang.String p_strCharset)
          Encode a string using quoted printable encoding.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Codec

public Codec()
Construct the object.

Method Detail

hexEncodeString

public java.lang.String hexEncodeString(java.lang.String p_str,
                                        java.lang.String p_strCharset)
Encode a string to it's hex representation, using the default character encoding, i.e, UTF-8.

Parameters:
p_str - The string to encode.
p_strCharset - The character set to be used for encoding.
Returns:
The hex representation of the string.

hexDecodeString

public java.lang.String hexDecodeString(java.lang.String p_str)
Decode a hex string to string, using the default character encoding, i.e, UTF-8.

Parameters:
p_str - The hex string to decode.
Returns:
The decoded string.

hexDecodeString

public java.lang.String hexDecodeString(java.lang.String p_str,
                                        java.lang.String p_strCharset)
Decode a hex string to string, using the specified character encoding.

Parameters:
p_str - The hex string to decode.
p_strCharset - The character set to be used for decoding.
Returns:
The decoded string.

quotedPrintableEncodeString

public java.lang.String quotedPrintableEncodeString(java.lang.String p_str,
                                                    java.lang.String p_strCharset)
Encode a string using quoted printable encoding.

Parameters:
p_str - The string to encode.
p_strCharset - The character set to be used for encoding.
Returns:
The quoted printable encoded string.

quotedPrintableDecodeString

public java.lang.String quotedPrintableDecodeString(java.lang.String p_str,
                                                    java.lang.String p_strCharset)
Decode a quoted printable encoded string, using the specified character encoding.

Parameters:
p_str - The quoted printable encoded string.
p_strCharset - The character set to be used for decoding.
Returns:
The decoded string.


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.