public class ContentCharsetFinder
extends java.lang.Object
Constructor and Description |
---|
ContentCharsetFinder() |
Modifier and Type | Method and Description |
---|---|
java.nio.charset.Charset |
getCharset(java.io.InputStream is,
java.lang.String mimetype)
Gets the characterset from the stream, if the mimetype is text and the text
has enough information to give the encoding away.
|
void |
setCharactersetFinders(java.util.List charactersetFinders)
Set the list of characterset finder to execute, in order, for text based content.
|
void |
setDefaultCharset(java.lang.String defaultCharset)
Override the system default charset.
|
void |
setMimetypeService(MimetypeService mimetypeService)
Set the mimetype service that will help determine if a particular mimetype can be
treated as encoded text or not.
|
public void setDefaultCharset(java.lang.String defaultCharset)
defaultCharset
- the default charactersetpublic void setMimetypeService(MimetypeService mimetypeService)
public void setCharactersetFinders(java.util.List charactersetFinders)
charactersetFinders
- a list of finderspublic java.nio.charset.Charset getCharset(java.io.InputStream is, java.lang.String mimetype)
is
- a stream that will not be affected by the call, but must
support markingmimetype
- the mimetype of the stream data - null if not knownCopyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.