|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.encoding.AbstractCharactersetFinder
org.alfresco.encoding.BomCharactersetFinder
public class BomCharactersetFinder
Byte Order Marker encoding detection.
| Constructor Summary | |
|---|---|
BomCharactersetFinder()
|
|
| Method Summary | |
|---|---|
protected java.nio.charset.Charset |
detectCharsetImpl(byte[] buffer)
Just searches the Byte Order Marker, i.e. |
protected int |
getBufferSize()
Some implementations may only require a few bytes to do detect the stream type, whilst others may be more efficient with larger buffers. |
void |
setBufferSize(int bufferSize)
Set the maximum number of bytes to read ahead when attempting to determine the characterset. |
| Methods inherited from class org.alfresco.encoding.AbstractCharactersetFinder |
|---|
detectCharset, detectCharset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BomCharactersetFinder()
| Method Detail |
|---|
public void setBufferSize(int bufferSize)
AbstractCharactersetFinder
setBufferSize in class AbstractCharactersetFinderbufferSize - the number of bytes - default 8K.protected int getBufferSize()
AbstractCharactersetFinder
Only override this method if there is a very compelling reason to adjust the buffer
size, and then consider handling the AbstractCharactersetFinder.setBufferSize(int) method by issuing a
warning. This will prevent users from setting the buffer size when it has no effect.
getBufferSize in class AbstractCharactersetFinderAbstractCharactersetFinder.setBufferSize(int)
protected java.nio.charset.Charset detectCharsetImpl(byte[] buffer)
throws java.lang.Exception
detectCharsetImpl in class AbstractCharactersetFinderbuffer - the buffer of data no bigger than the requested
best buffer size. This can,
very efficiently, be turned into an InputStream using a
ByteArrayInputStream.
java.lang.Exception - Any exception, checked or not
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||