Package org.apache.tika.language.detect
Class LanguageWriter
- java.lang.Object
- 
- java.io.Writer
- 
- org.apache.tika.language.detect.LanguageWriter
 
 
- 
- All Implemented Interfaces:
- Closeable,- Flushable,- Appendable,- AutoCloseable
 
 public class LanguageWriter extends Writer Writer that builds a language profile based on all the written content.- Since:
- Apache Tika 0.10
 
- 
- 
Constructor SummaryConstructors Constructor Description LanguageWriter(LanguageDetector detector)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Ignored.voidflush()Ignored.LanguageDetectorgetDetector()Returns the language detector used by this writer.LanguageResultgetLanguage()Returns the detected language based on text written thus far.voidreset()voidwrite(char[] cbuf, int off, int len)
 
- 
- 
- 
Constructor Detail- 
LanguageWriterpublic LanguageWriter(LanguageDetector detector) 
 
- 
 - 
Method Detail- 
getDetectorpublic LanguageDetector getDetector() Returns the language detector used by this writer. Note that the returned language detector gets updated whenever new characters are written.- Returns:
- language detector
 
 - 
getLanguagepublic LanguageResult getLanguage() Returns the detected language based on text written thus far.- Returns:
- LanguageResult
 
 - 
closepublic void close() throws IOExceptionIgnored.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- Writer
- Throws:
- IOException
 
 - 
flushpublic void flush() Ignored.
 - 
resetpublic void reset() 
 
- 
 
-