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. In-process only: deliberately not a registered component,
so no serialized form of it exists and serialization refuses loudly. On the IPC wire the
payload travels beside
the tuple in PipesRequest (which lifts it out on the parent and plants it back into
the worker's context on the child); it counts against maxIpcPayloadBytes like any
other part of the request. A request can supply it in no form at all.
- 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.
-