public class GuessEncodingCharsetFinder extends AbstractCharactersetFinder
Modifier and Type | Class and Description |
---|---|
static class |
GuessEncodingCharsetFinder.DummyCharset
A dummy charset to detect a default hit.
|
Constructor and Description |
---|
GuessEncodingCharsetFinder() |
Modifier and Type | Method and Description |
---|---|
protected Charset |
detectCharsetImpl(byte[] buffer)
Worker method for implementations to override.
|
detectCharset, detectCharset, getBufferSize, setBufferSize
protected Charset detectCharsetImpl(byte[] buffer) throws Exception
AbstractCharactersetFinder
The interface contract is that the data buffer must not be altered in any way.
detectCharsetImpl
in class AbstractCharactersetFinder
buffer
- the buffer of data no bigger than the requested
best buffer size. This can,
very efficiently, be turned into an InputStream using a
ByteArrayInputStream.Exception
- Any exception, checked or notCopyright © 2005–2016 Alfresco Software. All rights reserved.