Package com.redwood.agent.api.rtx
Class RTXReader
- java.lang.Object
- 
- com.redwood.agent.api.rtx.RTXReader
 
- 
- All Implemented Interfaces:
- RTXProducer,- Closeable,- AutoCloseable,- Iterable<RTXRow>
 
 public class RTXReader extends Object implements RTXProducer Reader for RTX format.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classRTXReader.StrictModeControl over how strictly the specification is interpreted.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()RTXMetadatagetMetadata()intgetRowNumber()RTXReader.StrictModegetStrictMode()booleanhasNext()Iterator<RTXRow>iterator()Iterator<RTXRow>iterator(String... cols)Return an iterator with a subset of columns.RTXRownext()Iterable<RTXRow>rows()Return anIterablefor rows from the current position on, this can only be used to retrieve a single iterator.Iterable<RTXRow>rows(String... cols)voidsetStrictMode(RTXReader.StrictMode newStrictMode)Sets theRTXReader.StrictMode, that is, when this RTXProducer does support strictMode.booleansupportsStrictMode(RTXReader.StrictMode newStrictMode)- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface java.lang.IterableforEach, spliterator
 
- 
 
- 
- 
- 
Constructor Detail- 
RTXReaderpublic RTXReader(InputStream newInputStream) throws RTXReaderException, RTXMetadataRuntimeException 
 - 
RTXReaderpublic RTXReader(Reader newInputReader) throws RTXReaderException, RTXMetadataRuntimeException 
 - 
RTXReaderpublic RTXReader(String filename) throws FileNotFoundException, RTXReaderException, RTXMetadataRuntimeException 
 
- 
 - 
Method Detail- 
closepublic void close() - Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- RTXProducer
 
 - 
getMetadatapublic RTXMetadata getMetadata() - Specified by:
- getMetadatain interface- RTXProducer
- Returns:
- the metadata of the data, describing the column definitions and sources.
 
 - 
hasNextpublic boolean hasNext() throws RTXReaderException- Specified by:
- hasNextin interface- RTXProducer
- Returns:
- true, when there is a next row, false otherwise
- Throws:
- RTXReaderException
 
 - 
nextpublic RTXRow next() throws RTXReaderException, RTXMetadataRuntimeException, RTXColumnRuntimeException - Specified by:
- nextin interface- RTXProducer
- Returns:
- the next row.
- Throws:
- RTXReaderException
- RTXMetadataRuntimeException
- RTXColumnRuntimeException
 
 - 
getRowNumberpublic int getRowNumber() - Specified by:
- getRowNumberin interface- RTXProducer
- Returns:
- the row-number of the current row. It starts with
         0 and is increased by RTXProducer.hasNext(). The first row will have the row-number 1.
 
 - 
getStrictModepublic RTXReader.StrictMode getStrictMode() - Specified by:
- getStrictModein interface- RTXProducer
 
 - 
setStrictModepublic void setStrictMode(RTXReader.StrictMode newStrictMode) Description copied from interface:RTXProducerSets theRTXReader.StrictMode, that is, when this RTXProducer does support strictMode.- Specified by:
- setStrictModein interface- RTXProducer
- Parameters:
- newStrictMode- the new mode
 
 - 
supportsStrictModepublic boolean supportsStrictMode(RTXReader.StrictMode newStrictMode) - Specified by:
- supportsStrictModein interface- RTXProducer
 
 - 
iteratorpublic Iterator<RTXRow> iterator() - Specified by:
- iteratorin interface- Iterable<RTXRow>
- Specified by:
- iteratorin interface- RTXProducer
 
 - 
rowspublic Iterable<RTXRow> rows(String... cols) Description copied from interface:RTXProducerReturn anIterablefor rows from the current position on, with a subset of columns, this can only be used to retrieve a single iterator.- Specified by:
- rowsin interface- RTXProducer
- Parameters:
- cols- a list of columns
- Returns:
- an Iterablewith a subset of columns.
 
 - 
rowspublic Iterable<RTXRow> rows() Description copied from interface:RTXProducerReturn anIterablefor rows from the current position on, this can only be used to retrieve a single iterator.- Specified by:
- rowsin interface- RTXProducer
- Returns:
- an Iterable.
 
 - 
iteratorpublic Iterator<RTXRow> iterator(String... cols) Description copied from interface:RTXProducerReturn an iterator with a subset of columns.- Specified by:
- iteratorin interface- RTXProducer
- Parameters:
- cols- a list of columns
- Returns:
- an iterator with a subset of columns.
 
 
- 
 
-