public class TextDetector extends java.lang.Object implements Detector
Note that text documents with a character encoding like UTF-16 are better
detected with MagicDetector
and an appropriate magic byte pattern.
Constructor and Description |
---|
TextDetector()
Constructs a
TextDetector which will look at the default number
of bytes from the beginning of the document. |
TextDetector(int bytesToTest)
Constructs a
TextDetector which will look at a given number of
bytes from the beginning of the document. |
Modifier and Type | Method and Description |
---|---|
MediaType |
detect(java.io.InputStream input,
Metadata metadata)
Looks at the beginning of the document input stream to determine
whether the document is text or not.
|
public TextDetector()
TextDetector
which will look at the default number
of bytes from the beginning of the document.public TextDetector(int bytesToTest)
TextDetector
which will look at a given number of
bytes from the beginning of the document.Copyright © 2010 - 2020 Adobe. All Rights Reserved