Class InlineBytes
java.lang.Object
org.apache.tika.pipes.core.fetcher.InlineBytes
- All Implemented Interfaces:
Serializable
Document bytes carried in the
ParseContext instead of fetched from a source, for
callers that already hold the content and would otherwise have to spool it to disk just to
hand it to the forked worker.
Read by BytesFetcher, which the tuple selects with fetcher id
BytesFetcher.FETCHER_ID. The IPC is Smile, so this rides as native binary rather than
base64; it counts against maxIpcPayloadBytes like any other part of the request.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanValue equality on the payload.byte[]getBytes()inthashCode()Length only.intlength()voidsetBytes(byte[] bytes) toString()Length only --FetchEmitTuple.toString()prints its ParseContext, and a debug log of a multi-megabyte payload is a real operational hazard.
-
Constructor Details
-
InlineBytes
public InlineBytes() -
InlineBytes
public InlineBytes(byte[] bytes)
-
-
Method Details
-
getBytes
public byte[] getBytes() -
setBytes
public void setBytes(byte[] bytes) -
length
public int length() -
equals
Value equality on the payload.Objects.equalswould compare array identity here, which would silently make two tuples carrying identical content unequal. -
hashCode
public int hashCode()Length only.FetchEmitTuple.hashCode()hashes its ParseContext, so hashing the payload itself would walk megabytes on every map insert; unequal-hash-implies-unequal still holds, and collisions fall through toequals(java.lang.Object). -
toString
Length only --FetchEmitTuple.toString()prints its ParseContext, and a debug log of a multi-megabyte payload is a real operational hazard.
-