|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.encoding.ContentCharsetFinder
public class ContentCharsetFinder
Utility bean to guess the charset given a stream and a mimetype.
Constructor Summary | |
---|---|
ContentCharsetFinder()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentCharsetFinder()
Method Detail |
---|
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 known
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |