org.deegree.commons.utils
Class EncodingGuesser

java.lang.Object
  extended by org.deegree.commons.utils.EncodingGuesser

public class EncodingGuesser
extends Object

EncodingGuesser

Version:
$Revision: 30244 $, $Date: 2011-03-28 16:28:27 +0200 (Mon, 28 Mar 2011) $
Author:
Andreas Schmitz, last edited by: $Author: aschmitz $

Constructor Summary
EncodingGuesser()
           
 
Method Summary
static Charset guess(byte[] bs)
           
static Charset guess(InputStream in)
           
static Charset guess(Map<Integer,Integer> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncodingGuesser

public EncodingGuesser()
Method Detail

guess

public static Charset guess(Map<Integer,Integer> map)
                     throws UnsupportedEncodingException
Parameters:
map -
Returns:
the guessed charset, or null
Throws:
UnsupportedEncodingException - if you don't have i18n.jar from Sun's JDK, I guess

guess

public static Charset guess(InputStream in)
                     throws IOException
Parameters:
in -
Returns:
the guessed encoding, or null, if none was determined
Throws:
IOException
UnsupportedEncodingException - if you don't have i18n.jar from Sun's JDK, I guess

guess

public static Charset guess(byte[] bs)
                     throws UnsupportedEncodingException
Parameters:
bs -
Returns:
the guessed encoding, or null
Throws:
UnsupportedEncodingException - if you don't have i18n.jar from Sun's JDK, I guess


Copyright © 2011. All Rights Reserved.