Class LanguageResource
java.lang.Object
org.apache.tika.server.core.resource.LanguageResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDetection accuracy saturates within the first few thousand characters, so anything past this only buys work whose size the caller chooses. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
MAX_DETECT_CHARS
public static final int MAX_DETECT_CHARSDetection accuracy saturates within the first few thousand characters, so anything past this only buys work whose size the caller chooses. Input beyond it is ignored rather than rejected: the answer is the same either way, and rejecting would break callers who legitimately post whole documents.This bounds the detection, not the request. This endpoint holds the text in the server's own heap instead of a pipes child, so a large enough body still costs memory before this class sees it; bounding the body itself is maxRequestSizeBytes' job.
- See Also:
-
-
Constructor Details
-
LanguageResource
public LanguageResource()
-
-
Method Details
-
detectPut
@PUT @Consumes("*/*") @Produces("text/plain") public String detectPut(InputStream is) throws IOException - Throws:
IOException
-
detectPost
@POST @Consumes("*/*") @Produces("text/plain") public String detectPost(InputStream is) throws IOException - Throws:
IOException
-