org.deegree.commons.utils
Class EncodingGuesser

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

public class EncodingGuesser
extends java.lang.Object

EncodingGuesser

Version:
$Revision: 25171 $, $Date: 2010-07-05 16:21:54 +0200 (Mo, 05. Jul 2010) $
Author:
Andreas Schmitz, last edited by: $Author: aschmitz $

Constructor Summary
EncodingGuesser()
           
 
Method Summary
static java.nio.charset.Charset guess(byte[] bs)
           
static java.nio.charset.Charset guess(java.io.InputStream in)
           
static java.nio.charset.Charset guess(java.util.Map<java.lang.Integer,java.lang.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 java.nio.charset.Charset guess(java.util.Map<java.lang.Integer,java.lang.Integer> map)
                                      throws java.io.UnsupportedEncodingException
Parameters:
map -
Returns:
the guessed charset, or null
Throws:
java.io.UnsupportedEncodingException - if you don't have i18n.jar from Sun's JDK, I guess

guess

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

guess

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


Copyright © 2011. All Rights Reserved.