public class TupleReaderImpl extends Object implements TupleReader
| Constructor and Description |
|---|
TupleReaderImpl() |
| Modifier and Type | Method and Description |
|---|---|
Integer |
characterSize()
Returns the number of characters contained in this tuple reader.
|
Integer |
characterSize(Integer fieldIndex)
Returns the number of characters contained in the field given by
fieldIndex of this tuple reader. |
String |
getEncoding()
Returns the encoding in which data shall be stored.
|
File |
getFile()
Returns the
|
Integer |
getNumOfTuples()
Returns the number of read tuples.
|
String |
getSeperator()
Returns the seperator with which the data will be departed on stream.
|
Collection<String> |
getTuple()
Returns a new tuple.
|
Collection<String> |
getTuple(Integer index)
Returns the tuple at position index.
|
Collection<Collection<String>> |
getTuples()
Returns all currently read tuples.
|
void |
readFile()
Reads the given file and creates an internal list of read tuples.
|
void |
restart()
Sets internal tuple pointer to start, so that getTuple() returns all
tuples from beginning.
|
void |
setEncoding(String encoding)
Sets the encoding in which data shall be stored.
|
void |
setFile(File inFile)
Sets the file from which the tuples shall come, so called datasource.
|
void |
setSeperator(String seperator)
Sets the seperator with which the data will be departed on stream.
|
Integer |
size()
Returns the number of tuples contained in this tuple reader.
|
public void setFile(File inFile)
TupleReadersetFile in interface TupleReaderinFile - - datasourcepublic File getFile()
TupleReadergetFile in interface TupleReaderpublic void setSeperator(String seperator)
TupleReadersetSeperator in interface TupleReaderseperator - with which the data will be departed on streampublic String getSeperator()
TupleReadergetSeperator in interface TupleReaderpublic void setEncoding(String encoding)
TupleReadersetEncoding in interface TupleReaderencoding - in which data shall be storedpublic String getEncoding()
TupleReadergetEncoding in interface TupleReaderpublic void readFile()
throws IOException
TupleReaderreadFile in interface TupleReaderIOExceptionpublic Collection<String> getTuple() throws IOException
getTuple in interface TupleReaderIOExceptionpublic Integer getNumOfTuples()
TupleReadergetNumOfTuples in interface TupleReaderpublic Collection<Collection<String>> getTuples()
getTuples in interface TupleReaderpublic Collection<String> getTuple(Integer index) throws IOException
TupleReadergetTuple in interface TupleReaderindex - position of tuple to returnIOExceptionpublic void restart()
TupleReaderrestart in interface TupleReaderpublic Integer size()
TupleReadersize in interface TupleReaderpublic Integer characterSize()
TupleReadercharacterSize in interface TupleReaderpublic Integer characterSize(Integer fieldIndex)
TupleReaderfieldIndex of this tuple reader.characterSize in interface TupleReaderfieldIndex - the index of the fieldCopyright © 2010–2015 Humboldt-Universität zu Berlin, INRIA. All rights reserved.