deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.framework.util
Class CharsetUtils

java.lang.Object
  extended by org.deegree.framework.util.CharsetUtils

public final class CharsetUtils
extends java.lang.Object

Since:
2.0
Version:
$Revision: 18195 $, 1.0. $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Andreas Poth, last edited by: $Author: mschneider $

Method Summary
static java.lang.String convertFromUnicode(java.lang.String input, java.lang.String targetCharset)
          A method to convert an input string in UTF-8 to a given charset by using CharsetDecoder
static java.lang.String convertToUnicode(java.lang.String input, java.lang.String inCharset)
          A method to convert an input string from a given charset to UTF-8 by using CharsetEncoder
static java.lang.String getSystemCharset()
          returns the name of the charset that is passed to the JVM as system property -DCHARSET=...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSystemCharset

public static java.lang.String getSystemCharset()
returns the name of the charset that is passed to the JVM as system property -DCHARSET=... If no charset has been defined UTF-8 will be returned as default.

Returns:
the name of the charset that is passed to the JVM as system property -DCHARSET=... If no charset has been defined UTF-8 will be returned as default.

convertToUnicode

public static java.lang.String convertToUnicode(java.lang.String input,
                                                java.lang.String inCharset)
A method to convert an input string from a given charset to UTF-8 by using CharsetEncoder

Parameters:
input -
inCharset -
Returns:
the charset encoded String

convertFromUnicode

public static java.lang.String convertFromUnicode(java.lang.String input,
                                                  java.lang.String targetCharset)
A method to convert an input string in UTF-8 to a given charset by using CharsetDecoder

Parameters:
input -
targetCharset -
Returns:
the decoded string

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org