Apache Abdera API

org.apache.abdera.protocol.util
Class EncodingUtil

java.lang.Object
  extended by org.apache.abdera.protocol.util.EncodingUtil

public class EncodingUtil
extends Object


Nested Class Summary
static class EncodingUtil.Codec
           
 
Field Summary
static String SANITIZE_PATTERN
           
 
Constructor Summary
EncodingUtil()
           
 
Method Summary
static String decode(String value)
          Used to decode a string as specified by RFC 2047
static String encode(String value)
           
static String encode(String value, String charset)
           
static String encode(String value, String charset, EncodingUtil.Codec codec)
          Used to encode a string as specified by RFC 2047
static InputStream getDecodingInputStream(InputStream in, String ce)
           
static String sanitize(String slug)
          Deprecated.  
static String sanitize(String slug, String filler)
          Deprecated.  
static String sanitize(String slug, String filler, boolean lower)
          Deprecated.  
static String sanitize(String slug, String filler, boolean lower, Normalizer.Form form)
          Deprecated.  
static String sanitize(String slug, String filler, boolean lower, Normalizer.Form form, String pattern)
          Deprecated.  
static String sanitize(String slug, String filler, boolean lower, String pattern)
          Deprecated.  
static String sanitize(String slug, String filler, String pattern)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SANITIZE_PATTERN

public static final String SANITIZE_PATTERN
See Also:
Constant Field Values
Constructor Detail

EncodingUtil

public EncodingUtil()
Method Detail

sanitize

public static String sanitize(String slug)
Deprecated. 

See Also:
Sanitizer

sanitize

public static String sanitize(String slug,
                              String filler)
Deprecated. 

See Also:
Sanitizer

sanitize

public static String sanitize(String slug,
                              String filler,
                              boolean lower)
Deprecated. 

See Also:
Sanitizer

sanitize

public static String sanitize(String slug,
                              String filler,
                              String pattern)
Deprecated. 

See Also:
Sanitizer

sanitize

public static String sanitize(String slug,
                              String filler,
                              boolean lower,
                              String pattern)
Deprecated. 

See Also:
Sanitizer

sanitize

public static String sanitize(String slug,
                              String filler,
                              boolean lower,
                              Normalizer.Form form)
Deprecated. 

See Also:
Sanitizer

sanitize

public static String sanitize(String slug,
                              String filler,
                              boolean lower,
                              Normalizer.Form form,
                              String pattern)
Deprecated. 

Used to sanitize a string. Optionally performs Unicode Form KD normalization on a string to break extended characters down, then replaces non alphanumeric characters with a specified filler replacement.

Parameters:
slug - The source string
filler - The replacement string
lower - True if the result should be lowercase
form - Unicode Normalization form to use (or null)
See Also:
Sanitizer

encode

public static String encode(String value)

encode

public static String encode(String value,
                            String charset)

encode

public static String encode(String value,
                            String charset,
                            EncodingUtil.Codec codec)
Used to encode a string as specified by RFC 2047

Parameters:
value - The string to encode
charset - The character set to use for the encoding

decode

public static String decode(String value)
Used to decode a string as specified by RFC 2047

Parameters:
value - The encoded string

getDecodingInputStream

public static InputStream getDecodingInputStream(InputStream in,
                                                 String ce)
                                          throws IOException
Throws:
IOException

Apache Abdera API

Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.