org.jbehave.core.i18n
Class StringEncoder

java.lang.Object
  extended by org.jbehave.core.i18n.StringEncoder

public class StringEncoder
extends Object

Supports encoding of strings using specified charsets for encoding (i.e. from String to byte[]) and decoding (i.e. from byte[] to String).


Nested Class Summary
static class StringEncoder.InvalidEncodingExcepion
           
 
Field Summary
static String UTF_8
           
 
Constructor Summary
StringEncoder()
          Creates an encoder using "UTF-8" for encoding and decoding
StringEncoder(String encoding, String decoding)
          Creates an encoder using the specifed charsets for encoding and decoding
 
Method Summary
 String encode(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF_8

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

StringEncoder

public StringEncoder()
Creates an encoder using "UTF-8" for encoding and decoding


StringEncoder

public StringEncoder(String encoding,
                     String decoding)
Creates an encoder using the specifed charsets for encoding and decoding

Parameters:
encoding - the name of the encoding charset
decoding - the name of the decoding charset
Method Detail

encode

public String encode(String value)


Copyright © 2003-2010. All Rights Reserved.