public class ContentCharsetFinder extends Object
| Constructor and Description |
|---|
ContentCharsetFinder() |
| Modifier and Type | Method and Description |
|---|---|
Charset |
getCharset(InputStream is,
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(List<org.alfresco.encoding.CharactersetFinder> charactersetFinders)
Set the list of characterset finder to execute, in order, for text based content.
|
void |
setDefaultCharset(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(String defaultCharset)
defaultCharset - the default charactersetpublic void setMimetypeService(MimetypeService mimetypeService)
public void setCharactersetFinders(List<org.alfresco.encoding.CharactersetFinder> charactersetFinders)
charactersetFinders - a list of finderspublic Charset getCharset(InputStream is, 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–2019 Alfresco Software. All rights reserved.