TableReader, Iterable<Object[]>, Iterator<Object[]>public class XmlReader extends AbstractStreamTableReader
| Modifier and Type | Field | Description |
|---|---|---|
protected static int |
END_OF_FILE_INDEX |
| Constructor | Description |
|---|---|
XmlReader() |
Constructor.
|
XmlReader(File file) |
Constructor.
|
XmlReader(InputStream in) |
Constructor.
|
XmlReader(String file) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the stream.
|
protected void |
deliverComments() |
Handles all comments that were registered for current row.
|
protected void |
deliverComments(int rowIndex) |
Handles all comments that were registered for current row.
|
String |
getColumnNameAttribute() |
Returns the attribute name of column tag that will contain the attribute name.
|
String |
getColumnTagName() |
Returns the column tag name.
|
String |
getColumnTypeAttribute() |
Returns the attribute name of column tag that contains the type of value.
|
String |
getRowTagName() |
Returns the row tag name.
|
boolean |
hasNext() |
Returns true if there are more rows.
|
protected void |
initParser() |
Initializes the XML parser thread.
|
boolean |
isUseColumnNameTags() |
Returns whether column names will be used as column tag names.
|
Object[] |
next() |
Returns the next row.
|
protected void |
readHeaderRow() |
Reads the header row.
|
protected void |
readNextRow() |
Reads the next row.
|
void |
reset() |
Resets the reader.
|
void |
setColumnNameAttribute(String columnNameAttribute) |
Sets the attribute name of column tag that will contain the attribute name.
|
void |
setColumnTagName(String columnTagName) |
Sets the column tag name.
|
void |
setColumnTypeAttribute(String columnTypeAttribute) |
Sets the attribute name of column tag that contains the type of value.
|
void |
setRowTagName(String rowTagName) |
Sets the row tag name.
|
void |
setUseColumnNameTags(boolean useColumnNameTags) |
Sets whether column names will be used as column tag names.
|
createInputStreamReader, createReader, getCharsetDecoder, getInputStream, getReader, remove, setCharset, setCharset, setCharsetDecoder, setInputStreamaddCommentCallBack, convert, convert, convertArray, convertArray, get, getColumnIndex, getColumnType, getHeaderRow, getLineCount, getMinimumColumnCount, getRowCount, getTypeConversionHandler, hasHeaderRow, incrementLineCount, incrementRowCount, isHeaderRowRead, iterator, notifyComment, open, registerCommentCallBack, registerTypeConversionHandler, removeCommentCallBack, setColumnType, setHasHeaderRow, setHeaderRow, setHeaderRowRead, setMinimumColumnCount, unregisterCommentCallBack, unregisterTypeConversionHandlerforEach, spliteratorforEachRemainingprotected static final int END_OF_FILE_INDEX
public XmlReader()
public XmlReader(InputStream in)
in - stream to readpublic XmlReader(File file) throws FileNotFoundException
file - fiel to readFileNotFoundException - when the file cannot be foundpublic XmlReader(String file) throws FileNotFoundException
file - file to readFileNotFoundException - when the file cannot be foundpublic void close()
close in interface TableReaderclose in class AbstractStreamTableReaderAbstractStreamTableReader.close()public void reset()
reset in interface TableReaderreset in class AbstractStreamTableReaderAbstractStreamTableReader.reset()public boolean hasNext()
Iterator.hasNext()public Object[] next()
Iterator.next()protected void readNextRow()
protected void readHeaderRow()
readHeaderRow in class AbstractTableReaderAbstractTableReader.readHeaderRow()protected void initParser()
protected void deliverComments()
protected void deliverComments(int rowIndex)
rowIndex - the index of the row to be processedpublic String getRowTagName()
public void setRowTagName(String rowTagName)
rowTagName - the rowTagName to setpublic String getColumnTagName()
public void setColumnTagName(String columnTagName)
columnTagName - the columnTagName to setpublic boolean isUseColumnNameTags()
public void setUseColumnNameTags(boolean useColumnNameTags)
useColumnNameTags - the useColumnNameTags to setpublic String getColumnNameAttribute()
isUseColumnNameTags() returns false.public void setColumnNameAttribute(String columnNameAttribute)
isUseColumnNameTags() returns false.columnNameAttribute - the columnNameAttribute to setpublic String getColumnTypeAttribute()
public void setColumnTypeAttribute(String columnTypeAttribute)
columnTypeAttribute - the columnTypeAttribute to setCopyright © 2018. All rights reserved.