Class ExtractionPluginDataReader
java.lang.Object
org.hansken.plugin.extraction.runtime.grpc.client.ExtractionPluginDataReader
This class is used to read trace data. It keeps track of traces and dataTypes which are available and it keeps a cache
of RandomAccessData instances. These are created when read is called on the datastream for the first time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmarkDataAvailable(SearchTrace trace) Mark the dataTypes of the provided trace as available.byte[]Read count bytes of data starting on position from dataType of traceId.
-
Constructor Details
-
ExtractionPluginDataReader
-
-
Method Details
-
markDataAvailable
Mark the dataTypes of the provided trace as available.- Parameters:
trace- SearchTrace with available data
-
read
Read count bytes of data starting on position from dataType of traceId.- Parameters:
traceUid- uid of the tracedataType- which type of data to read (html, raw, ...)position- offset to start readingcount- number of bytes to read- Returns:
- byte array of available data
- Throws:
IOException- when reading data failsNoSuchElementException- if no data for a given traceId and dataType combination is available
-