gov.lanl.archive.rewrite.charset
Class StandardCharsetDetector

java.lang.Object
  extended by gov.lanl.archive.rewrite.charset.CharsetDetector
      extended by gov.lanl.archive.rewrite.charset.StandardCharsetDetector

public class StandardCharsetDetector
extends CharsetDetector


Field Summary
 
Fields inherited from class gov.lanl.archive.rewrite.charset.CharsetDetector
CHARSET_TOKEN, DEFAULT_CHARSET, HTTP_CONTENT_TYPE_HEADER, MAX_CHARSET_READAHEAD
 
Constructor Summary
StandardCharsetDetector()
           
 
Method Summary
 String getCharset(InputStream resource, String ctype)
           
 
Methods inherited from class gov.lanl.archive.rewrite.charset.CharsetDetector
contentTypeToCharset, getCharsetFromBytes, getCharsetFromHeaders, getCharsetFromMeta, isCharsetSupported, mapCharset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardCharsetDetector

public StandardCharsetDetector()
Method Detail

getCharset

public String getCharset(InputStream resource,
                         String ctype)
                  throws IOException
Specified by:
getCharset in class CharsetDetector
Parameters:
resource - (presumably text) Resource to determine the charset
Returns:
String charset name for the Resource
Throws:
IOException - if there are problems reading the Resource


Copyright © 2013. All Rights Reserved.