cpdetector.test
Class EncodingRepository
java.lang.Object
cpdetector.test.EncodingRepository
public class EncodingRepository
- extends Object
A proprietary hardcoded singleton that provides information about the
verified codepage of a document by reading (and caching) a file
"encoding.verify" from the directory the requested file resides.
- Author:
- Achim Westermann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static EncodingRepository getInstance()
getVerifiedEncoding
public Charset getVerifiedEncoding(URL document)
throws IOException
- Returns:
- An instance of
UnsupportedCharset, if no verification
record could be found or the Charset instance corresponding to the
verified codepage of the document.
- Throws:
IOException
Copyleft ㊢ 2003-2004 MPL 1.1, All Rights Footloose.