OpenAPI 1.0

com.aquafold.openapi.io
Interface AQDataReader

All Superinterfaces:
Closeable
All Known Subinterfaces:
AQExcelReader, AQFormattedTextReader, AQHttpLogReader, AQResultSet, AQTextFileReader, AQTextStringReader

public interface AQDataReader
extends Closeable

A reader which extracts data into a sequence of AQDataRow objects.


Method Summary
 void close()
          Use this method to release critical resources (e.g.
 AQColumnStructure getColumnStructure()
          To get the reader column structure.
 AQDataSet read()
          Sequentially reads the input stream into an in-memory data set.
 AQDataRow readNextRow()
          Returns a next data row or null if no more rows is available, or end of file is reached.
 

Method Detail

readNextRow

AQDataRow readNextRow()
                      throws Exception
Returns a next data row or null if no more rows is available, or end of file is reached.

Throws:
Exception

close

void close()
           throws IOException
Use this method to release critical resources (e.g. database, file) immediately instead of waiting for this to happen when it's automatically closed. It is generally good practice to release resources as soon as you are finished with them.

Specified by:
close in interface Closeable
Throws:
IOException - if an I/O error occurs

read

AQDataSet read()
               throws Exception
Sequentially reads the input stream into an in-memory data set.

Throws:
Exception - On Error.

getColumnStructure

AQColumnStructure getColumnStructure()
To get the reader column structure.

Example: var r = aqua.io.newTextReader(); print(r.columnStructure); r.columnNames = ['a','b','c']; print(r.columnStructure);

Returns:
An AQColumnStructure object; null if column structure is not available.

OpenAPI 1.0


Copyright © 2010 AquaFold, Inc. All Rights Reserved. Use is subject to license terms.