Class FeedSimTupleInputStream

java.lang.Object
java.io.InputStream
com.streambase.sb.feedsim.FeedSimCSVInputStream
com.streambase.sb.feedsim.FeedSimTupleInputStream
All Implemented Interfaces:
Closeable, AutoCloseable

public abstract class FeedSimTupleInputStream extends FeedSimCSVInputStream
FeedSim can be configured to use classes that extend this abstract class. This allows users to read proprietary formatted files and deliver their contents so that FeedSim can play their data like any other product supported format.

This interface may be helpful for proprietary data formats where converting to CSV is relatively expensive when compared with using native data types and converting directly to a StreamBase tuple.

This class provides an implementation of the read() method declared in the superclass. However in 7.5.4 and beyond, the read() method is no longer used. The implementation here calls "readTuple()" and converts each Tuple to a sequence of "char"s in CSV format, with those chars yielded by "read()" one at a time. Though not used by FeedSim or the FeedSim editor in Studio, the "read()" method is provided as a convenience, if the equivalent CSV data is desired. In 7.5.4 and beyond, configuration of a FeedSim file that uses this kind of plugin is similar to a FeedSim file configuration via a CSV file that includes a header, however the "getSchema()" field names are used instead of the CSV header names. Also the column strings in a CSV file are replaced by the field values in the "readTuple()" results. Also, in 7.5.4, mapping to destination fields is required, and done by-name. Before 7.5.4, the read() method was still used in the FeedSim editor to display preview contents, etc. If the Timestamp builder was used, then the readTuple() method was not be called, and data was only delivered via the read() method. Also, before 7.5.4, by-name field to simulation field mapping was not supported: only by-index, when the index mappings were incrementing by 1, starting at 1 (1, 2, 3...) was supported.

Since:
6.5.8