org.weborganic.berlioz.util
Class CharsetUtils
java.lang.Object
org.weborganic.berlioz.util.CharsetUtils
public final class CharsetUtils
- extends Object
A bunch of utility functions for dealing with character sets.
- Since:
- Berlioz 0.8.1
- Version:
- Berlioz 0.8.1 - 24 June 2011
- Author:
- Christophe Lauret
Method Summary |
static int |
length(CharSequence content,
Charset charset)
Calculates the byte length of the specified content using the given charset. |
length
public static int length(CharSequence content,
Charset charset)
- Calculates the byte length of the specified content using the given charset.
- Parameters:
content
- The content to measurecharset
- The character set
- Returns:
- the byte length of the content based on a specified charset; or -1 if unable to calculate it
- Throws:
NullPointerException
- if either argument is null
.