org.jbehave.core.i18n
Class StringCoder
java.lang.Object
org.jbehave.core.i18n.StringCoder
public class StringCoder
- extends java.lang.Object
Supports encoding and decoding of strings using specified charsets.
Constructor Summary |
StringCoder()
Creates a StringCoder using Charset.defaultCharset().name() |
StringCoder(java.lang.String charsetName)
Creates a StringCoder using the specified charset |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringCoder
public StringCoder()
- Creates a StringCoder using
Charset.defaultCharset().name()
StringCoder
public StringCoder(java.lang.String charsetName)
- Creates a StringCoder using the specified charset
- Parameters:
charsetName
- the name of the charset
getCharsetName
public java.lang.String getCharsetName()
isCharsetSupported
public boolean isCharsetSupported()
canonicalize
public java.lang.String canonicalize(java.lang.String input)
- Encodes and decodes input using the coder charset
- Parameters:
input
- the String input
- Returns:
- String after encoding and decoding
- Throws:
StringCoder.InvalidEncodingException
- if encoding is not supported for charset
validateEncoding
public void validateEncoding(java.lang.String input,
StringCoder.Mode mode)
Copyright © 2003-2010. All Rights Reserved.