Class FlatFile
- All Implemented Interfaces:
AutoCloseable,ResultSet,Wrapper
- Direct Known Subclasses:
FlatFileEx1,FlatFileEx2
ResultSet.
FlatFile extends AbstractFlatFile to handle text
flat files.
As the file is read, it is split into lines using the
BufferedReader.readLine(boolean, boolean[]) method. Each line is then split into
tokens using a Tokenizer. Finally, each token string is
converted into an Object using a Parser.
Parser is an interface defined within this class for converting
a String into an Object. Parser
objects for standard types are defined as static members of this class. By
default, for each column its class is used to select one of these predefined
parsers to parse that column.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDefines a method that parses aStringinto anObject.Nested classes/interfaces inherited from class com.imsl.io.AbstractFlatFile
AbstractFlatFile.FlatFileSQLException, AbstractFlatFile.FlatFileSQLFeatureNotSupportedException -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FlatFile.ParserImplements aParserthat converts aStringto aByte.static final FlatFile.ParserImplements aParserthat converts aStringto aDouble.static final FlatFile.ParserImplements aParserthat converts aStringto aFloat.static final FlatFile.ParserImplements aParserthat converts aStringto anInteger.static final FlatFile.ParserImplements aParserthat converts aStringto aLong.static final FlatFile.ParserImplements aParserthat converts aStringto aShort.Fields inherited from interface java.sql.ResultSet
CLOSE_CURSORS_AT_COMMIT, CONCUR_READ_ONLY, CONCUR_UPDATABLE, FETCH_FORWARD, FETCH_REVERSE, FETCH_UNKNOWN, HOLD_CURSORS_OVER_COMMIT, TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, TYPE_SCROLL_SENSITIVE -
Constructor Summary
ConstructorsConstructorDescriptionFlatFile(BufferedReader reader) Creates aFlatFilewith the CSV tokenizer.FlatFile(BufferedReader reader, Tokenizer tokenizer) Creates a FlatFile from a BufferedReader.Creates a FlatFile from a CSV file.Creates aFlatFilefrom a file. -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]doGetBytes(int columnIndex) Gets the value of the designated column in the current row as abytearray.protected booleandoNext()Moves the cursor down one row from its current position.intReturns the number of columns in thisResultSetobject.intRetrieves the holdability of thisResultSetobject.getNCharacterStream(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject.getNCharacterStream(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject.getNClob(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aNClobobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as aNClobobject in the Java programming language.getNString(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language.getNString(String columnLabel) Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language.getObject(int columnIndex) Gets the value of the designated column in the current row of thisResultSetobject as anObjectin the Java programming language.getRowId(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.RowIdobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.RowIdobject in the Java programming language.getSQLXML(int columnIndex) Retrieves the value of the designated column in the current row of thisResultSetas ajava.sql.SQLXMLobject in the Java programming language.Retrieves the value of the designated column in the current row of thisResultSetas ajava.sql.SQLXMLobject in the Java programming language.booleanisClosed()Retrieves whether thisResultSetobject has been closed.booleanisWrapperFor(Class<?> iface) Returnstrueif this either implements the interface argument or is directly or indirectly a wrapper for an object that does.protected StringreadLine()Reads and returns a line from the input.protected voidsetColumnClass(int columnIndex, Class columnClass) Sets a column class.protected voidsetColumnParser(int columnIndex, FlatFile.Parser columnParser) Sets the Parser for the specified column.protected voidsetDateColumnParser(int columnIndex, String pattern, Locale locale) Creates for a pattern string and sets the Parser for the specified column.<T> TReturns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.voidupdateAsciiStream(int columnIndex, InputStream x) Updates the designated column with an ASCII stream value.voidupdateAsciiStream(int columnIndex, InputStream x, int length) Updates the designated column with an ASCII stream value, which is the specified number of bytes.voidupdateAsciiStream(int columnIndex, InputStream x, long length) Updates the designated column with an ASCII stream value, which is the specified number of bytes.voidupdateAsciiStream(String columnLabel, InputStream x) Updates the designated column with an ASCII stream value.voidupdateAsciiStream(String columnLabel, InputStream x, int length) Updates the designated column with an ASCII stream value, which is the specified number of bytes.voidupdateAsciiStream(String columnLabel, InputStream x, long length) Updates the designated column with an ASCII stream value, which is the specified number of bytes.voidupdateBinaryStream(int columnIndex, InputStream x) Updates the designated column with a binary stream value.voidupdateBinaryStream(int columnIndex, InputStream x, int length) Updates the designated column with a binary stream value, which is the specified number of bytes.voidupdateBinaryStream(int columnIndex, InputStream x, long length) Updates the designated column with a binary stream value, which is the specified number of bytes.voidupdateBinaryStream(String columnLabel, InputStream x) Updates the designated column with a binary stream value.voidupdateBinaryStream(String columnLabel, InputStream x, int length) Updates the designated column with a binary stream value.voidupdateBinaryStream(String columnLabel, InputStream x, long length) Updates the designated column with a binary stream value.voidupdateBlob(int columnIndex, InputStream inputStream) Updates the designated column using the given input stream.voidupdateBlob(int columnIndex, InputStream inputStream, long length) Updates the designated column using the given input stream, which is the specified number of bytes.voidupdateBlob(int columnIndex, Blob x) Updates the designated column with ajava.sql.Blobvalue.voidupdateBlob(String columnLabel, InputStream inputStream) Updates the designated column using the given input stream.voidupdateBlob(String columnLabel, InputStream inputStream, long length) Updates the designated column using the given input stream, which is the specified number of bytes.voidupdateBlob(String columnLabel, Blob x) Updates the designated column with ajava.sql.Blobvalue.voidupdateCharacterStream(int columnIndex, Reader x) Updates the designated column with a character stream value.voidupdateCharacterStream(int columnIndex, Reader x, int length) Updates the designated column with a character stream value, which is the specified number of bytes.voidupdateCharacterStream(int columnIndex, Reader x, long length) Updates the designated column with a character stream value, which is the specified number of bytes.voidupdateCharacterStream(String columnLabel, Reader reader) Updates the designated column with a character stream value.voidupdateCharacterStream(String columnLabel, Reader reader, int length) Updates the designated column with a character stream value, which is the specified number of bytes.voidupdateCharacterStream(String columnLabel, Reader reader, long length) Updates the designated column with a character stream value, which is the specified number of bytes.voidupdateClob(int columnIndex, Reader reader) Updates the designated column using the givenReaderobject.voidupdateClob(int columnIndex, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateClob(int columnIndex, Clob x) Updates the designated column with ajava.sql.Clobvalue.voidupdateClob(String columnLabel, Reader reader) Updates the designated column using the givenReaderobject.voidupdateClob(String columnLabel, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateClob(String columnLabel, Clob x) Updates the designated column with ajava.sql.Clobvalue.voidupdateNCharacterStream(int columnIndex, Reader x) Updates the designated column with a character stream value.voidupdateNCharacterStream(int columnIndex, Reader x, long length) Updates the designated column with a character stream value, which is the specified number of bytes.voidupdateNCharacterStream(String columnLabel, Reader reader) Updates the designated column with a character stream value.voidupdateNCharacterStream(String columnLabel, Reader reader, long length) Updates the designated column with a character stream value, which is the specified number of bytes.voidupdateNClob(int columnIndex, Reader reader) Updates the designated column using the givenReader.voidupdateNClob(int columnIndex, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateNClob(int columnIndex, NClob nClob) Updates the designated column with ajava.sql.NClobvalue.voidupdateNClob(String columnLabel, Reader reader) Updates the designated column using the givenReaderobject.voidupdateNClob(String columnLabel, Reader reader, long length) Updates the designated column using the givenReaderobject, which is the given number of characters long.voidupdateNClob(String columnLabel, NClob nClob) Updates the designated column with ajava.sql.NClobvalue.voidupdateNString(int columnIndex, String nString) Updates the designated column with aStringvalue.voidupdateNString(String columnLabel, String nString) Updates the designated column with a String value.voidupdateRowId(int columnIndex, RowId x) Updates the designated column with aRowIdvalue.voidupdateRowId(String columnLabel, RowId x) Updates the designated column with aRowIdvalue.voidupdateSQLXML(int columnIndex, SQLXML xmlObject) Updates the designated column with ajava.sql.SQLXMLvalue.voidupdateSQLXML(String columnLabel, SQLXML xmlObject) Updates the designated column with ajava.sql.SQLXMLvalue.Methods inherited from class com.imsl.io.AbstractFlatFile
absolute, afterLast, beforeFirst, beginGet, cancelRowUpdates, clearWarnings, close, deleteRow, findColumn, findColumnName, first, getArray, getArray, getAsciiStream, getAsciiStream, getBigDecimal, getBigDecimal, getBigDecimal, getBigDecimal, getBinaryStream, getBinaryStream, getBlob, getBlob, getBoolean, getBoolean, getByte, getByte, getBytes, getBytes, getCharacterStream, getCharacterStream, getClob, getClob, getColumnClass, getConcurrency, getCursorName, getDate, getDate, getDate, getDate, getDouble, getDouble, getFetchDirection, getFetchSize, getFloat, getFloat, getInt, getInt, getLong, getLong, getMetaData, getObject, getObject, getObject, getObject, getObject, getRef, getRef, getRow, getShort, getShort, getStatement, getString, getString, getTime, getTime, getTime, getTime, getTimestamp, getTimestamp, getTimestamp, getTimestamp, getType, getUnicodeStream, getUnicodeStream, getURL, getURL, getWarnings, insertRow, isAfterLast, isBeforeFirst, isFirst, isLast, last, moveToCurrentRow, moveToInsertRow, next, previous, refreshRow, relative, rowDeleted, rowInserted, rowUpdated, setColumnName, setFetchDirection, setFetchSize, setWarning, updateArray, updateArray, updateBigDecimal, updateBigDecimal, updateBoolean, updateBoolean, updateByte, updateByte, updateBytes, updateBytes, updateDate, updateDate, updateDouble, updateDouble, updateFloat, updateFloat, updateInt, updateInt, updateLong, updateLong, updateNull, updateNull, updateObject, updateObject, updateObject, updateObject, updateRef, updateRef, updateRow, updateShort, updateShort, updateString, updateString, updateTime, updateTime, updateTimestamp, updateTimestamp, wasNullMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.ResultSet
updateObject, updateObject, updateObject, updateObject
-
Field Details
-
PARSE_BYTE
Implements aParserthat converts aStringto aByte.- See Also:
-
PARSE_SHORT
Implements aParserthat converts aStringto aShort.- See Also:
-
PARSE_INTEGER
Implements aParserthat converts aStringto anInteger.- See Also:
-
PARSE_LONG
Implements aParserthat converts aStringto aLong.- See Also:
-
PARSE_FLOAT
Implements aParserthat converts aStringto aFloat.- See Also:
-
PARSE_DOUBLE
Implements aParserthat converts aStringto aDouble.- See Also:
-
-
Constructor Details
-
FlatFile
Creates a FlatFile from a BufferedReader.- Parameters:
reader- aBufferedReaderthat is the stream to be readtokenizer- aTokenizerthat splits a text line into tokens, one per column
-
FlatFile
Creates aFlatFilewith the CSV tokenizer.The CSV tokenizer is for reading comma separated value files.
- Parameters:
reader- aBufferedReaderthat is the stream to be read- Throws:
IOException
-
FlatFile
Creates a FlatFile from a CSV file.A CSV file is a comma separated value file.
- Parameters:
filename- aStringthat specifies the name of the file to be read- Throws:
IOException
-
FlatFile
Creates aFlatFilefrom a file.- Parameters:
filename- aStringthat specifies the name of the file to be readtokenizer- aTokenizerthat splits a text line into tokens, one per column- Throws:
IOException
-
-
Method Details
-
isWrapperFor
Returnstrueif this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returnsfalseotherwise. If this implements the interface then returntrue, else if this is a wrapper then return the result of recursively callingisWrapperForon the wrapped object. If this does not implement the interface and is not a wrapper, returnfalse. This method should be implemented as a low-cost operation compared to unwrap so that callers can use this method to avoid expensive unwrap calls that may fail. If this method returnstruethen calling unwrap with the same argument should succeed.- Parameters:
iface- aClassdefining an interface- Returns:
- a
boolean,false - Throws:
SQLException- if an error occurs while determining whether this is a wrapper for an object with the given interface
-
unwrap
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise returns the result of callingunwraprecursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then anSQLExceptionis thrown.- Type Parameters:
T- the argument type to be unwrapped- Parameters:
iface- aClassdefining an interface that the result must implement- Returns:
- an object that implements the interface. The object may be a proxy for the actual implementing object.
- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateRowId
public void updateRowId(int columnIndex, RowId x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with aRowIdvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aRowIdthat specifies the column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateRowId
public void updateRowId(String columnLabel, RowId x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with aRowIdvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aRowIdthat specifies the column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getRowId
public RowId getRowId(int columnIndex) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.RowIdobject in the Java programming language.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- a
RowIdthat is the column value. If the value is a SQLNULLthe value returned isnull. - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getRowId
public RowId getRowId(String columnLabel) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.sql.RowIdobject in the Java programming language.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.- Returns:
- a
RowIdthat is the column value. If the value is a SQLNULLthe value returned isnull. - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getHoldability
Retrieves the holdability of thisResultSetobject.- Returns:
- an
intthat is eitherResultSet.HOLD_CURSORS_OVER_COMMITorResultSet.CLOSE_CURSORS_AT_COMMIT - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
isClosed
Retrieves whether thisResultSetobject has been closed. AResultSetis closed if the method close has been called on it, or if it is automatically closed.- Returns:
- a
boolean,trueif thisResultSetobject is closed,falseif it is still open - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateSQLXML
public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.SQLXMLvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.xmlObject- aSQLXMLobject that specifies the value for the column to be updated- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getSQLXML
public SQLXML getSQLXML(int columnIndex) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetas ajava.sql.SQLXMLobject in the Java programming language.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- an
SQLXMLobject that maps an SQL XML value - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getSQLXML
public SQLXML getSQLXML(String columnLabel) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetas ajava.sql.SQLXMLobject in the Java programming language.- Parameters:
columnLabel- anStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.- Returns:
- an
SQLXMLobject that maps an SQL XML value - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getNClob
public NClob getNClob(int columnIndex) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as aNClobobject in the Java programming language.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- an
NClobobject representing the SQLNCLOBvalue in the specified column - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getNString
public String getNString(int columnIndex) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language. It is intended for use when accessingNCHAR,NVARCHARandLONGNVARCHARcolumns.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- a
Stringthat specifies the column value. If the value is SQLNULL, the value returned isnull. - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getNString
public String getNString(String columnLabel) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as aStringin the Java programming language. It is intended for use when accessingNCHAR,NVARCHARandLONGNVARCHARcolumns.- Parameters:
columnLabel- anStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.- Returns:
- a
Stringthat specifies the column value. If the value is SQLNULL, the value returned isnull. - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getNClob
public NClob getNClob(String columnLabel) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as aNClobobject in the Java programming language.- Parameters:
columnLabel- anStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.- Returns:
- an
NClobobject representing the SQLNCLOBvalue in the specified column - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateSQLXML
public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLFeatureNotSupportedException Updates the designated column with ajava.sql.SQLXMLvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.xmlObject- aSQLXMLobject the specifies the column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implementedSQLFeatureNotSupportedException
-
getNCharacterStream
Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject. It is intended for use when accessingNCHAR,NVARCHARandLONGNVARCHARcolumns.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- a
java.io.Readerobject that contains the column value. If the value is SQLNULL, the value returned isnullin the Java programming language. - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implementedSQLFeatureNotSupportedException
-
updateNString
public void updateNString(int columnIndex, String nString) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with aStringvalue. It is intended for use when updating,NCHAR,NVARCHARandLONGNVARCHARcolumns.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.nString- aStringthat specifies the value for the column to be updated- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNString
public void updateNString(String columnLabel, String nString) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a String value. It is intended for use when updatingNCHAR,NVARCHARandLONGNVARCHARcolumns.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.nString- aStringthat specifies the value for the column to be updated- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getNCharacterStream
public Reader getNCharacterStream(String columnLabel) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Retrieves the value of the designated column in the current row of thisResultSetobject as ajava.io.Readerobject. It is intended for use when accessingNCHAR,NVARCHARandLONGNVARCHARcolumns.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.- Returns:
- a
java.io.Readerobject that contains the column value. If the value is SQLNULL, the value returned isnullin the Java programming language. - Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with an ASCII stream value. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aInputStreamthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream x, int length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with an ASCII stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateAsciiStreamin interfaceResultSet- Overrides:
updateAsciiStreamin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aInputStreamthat specifies the new column valuelength- anintthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateAsciiStream
public void updateAsciiStream(int columnIndex, InputStream x, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with an ASCII stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aInputStreamthat specifies the new column valuelength- anlongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateAsciiStream
public void updateAsciiStream(String columnLabel, InputStream x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with an ASCII stream value. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aInputStreamthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateAsciiStream
public void updateAsciiStream(String columnLabel, InputStream x, int length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with an ASCII stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateAsciiStreamin interfaceResultSet- Overrides:
updateAsciiStreamin classAbstractFlatFile- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aInputStreamthat specifies the new column valuelength- anintthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateAsciiStream
public void updateAsciiStream(String columnLabel, InputStream x, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with an ASCII stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aInputStreamthat specifies the new column valuelength- anlongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a binary stream value. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aInputStreamthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream x, int length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a binary stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateBinaryStreamin interfaceResultSet- Overrides:
updateBinaryStreamin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aInputStreamthat specifies the new column valuelength- anintthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBinaryStream
public void updateBinaryStream(int columnIndex, InputStream x, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a binary stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aInputStreamthat specifies the new column valuelength- anlongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBinaryStream
public void updateBinaryStream(String columnLabel, InputStream x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a binary stream value. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aInputStreamthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBinaryStream
public void updateBinaryStream(String columnLabel, InputStream x, int length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a binary stream value. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateBinaryStreamin interfaceResultSet- Overrides:
updateBinaryStreamin classAbstractFlatFile- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aInputStreamthat specifies the new column valuelength- anintthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBinaryStream
public void updateBinaryStream(String columnLabel, InputStream x, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a binary stream value. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aInputStreamthat specifies the new column valuelength- anlongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBlob
public void updateBlob(int columnIndex, Blob x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.Blobvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateBlobin interfaceResultSet- Overrides:
updateBlobin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aBlobthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBlob
public void updateBlob(int columnIndex, InputStream inputStream) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the given input stream. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.inputStream- anInputStreamthat contains the data to set the parameter value to- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBlob
public void updateBlob(int columnIndex, InputStream inputStream, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the given input stream, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.inputStream- anInputStreamthat contains the data to set the parameter value tolength- anlongthat specifies the number of bytes in the parameter data- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBlob
public void updateBlob(String columnLabel, Blob x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.Blobvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateBlobin interfaceResultSet- Overrides:
updateBlobin classAbstractFlatFile- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aBlobthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBlob
public void updateBlob(String columnLabel, InputStream inputStream) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the given input stream. The data will be read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.inputStream- anInputStreamthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateBlob
public void updateBlob(String columnLabel, InputStream inputStream, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the given input stream, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.inputStream- anInputStreamthat specifies the new column valuelength- anlongthat specifies the number of bytes in the parameter data- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value. The data is read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aReaderthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader x, int length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateCharacterStreamin interfaceResultSet- Overrides:
updateCharacterStreamin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aReaderthat specifies the new column valuelength- anintthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateCharacterStream
public void updateCharacterStream(int columnIndex, Reader x, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aReaderthat specifies the new column valuelength- anlongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateCharacterStream
public void updateCharacterStream(String columnLabel, Reader reader) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value. The data is read from the stream as needed until end-of-stream is reached.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateCharacterStream
public void updateCharacterStream(String columnLabel, Reader reader, int length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateCharacterStreamin interfaceResultSet- Overrides:
updateCharacterStreamin classAbstractFlatFile- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column valuelength- anintthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateCharacterStream
public void updateCharacterStream(String columnLabel, Reader reader, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value, which is the specified number of bytes.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column valuelength- anlongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateClob
public void updateClob(int columnIndex, Clob x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.Clobvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateClobin interfaceResultSet- Overrides:
updateClobin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aClobthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateClob
public void updateClob(int columnIndex, Reader reader) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject. The data is read from the stream as needed until end-of-stream is reached. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.reader- aReaderthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateClob
public void updateClob(int columnIndex, Reader reader, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject, which is the given number of characters long. When a very large UNICODE value is input to aLONGVARCHARparameter, it may be more practical to send it via ajava.io.Readerobject. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.reader- aReaderthat specifies the new column valuelength- alongthat specifies the number of characters in the parameter data- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateClob
public void updateClob(String columnLabel, Clob x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.Clobvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Specified by:
updateClobin interfaceResultSet- Overrides:
updateClobin classAbstractFlatFile- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.x- aClobthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateClob
public void updateClob(String columnLabel, Reader reader) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject. The data is read from the stream as needed until end-of-stream is reached. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateClob
public void updateClob(String columnLabel, Reader reader, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject, which is the given number of characters long. When a very large UNICODE value is input to aLONGVARCHARparameter, it may be more practical to send it via ajava.io.Readerobject. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column valuelength- alongthat specifies the number of characters in the parameter data- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNCharacterStream
public void updateNCharacterStream(int columnIndex, Reader x) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value. The data is read from the stream as needed until end-of-stream is reached. The driver does the necessary conversion from Java character format to the national character set in the database. It is intended for use when updatingNCHAR,NVARCHARandLONGNVARCHARcolumns.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aReaderthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNCharacterStream
public void updateNCharacterStream(int columnIndex, Reader x, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value, which is the specified number of bytes. The driver does the necessary conversion from Java character format to the national character set in the database. It is intended for use when updatingNCHAR,NVARCHARandLONGNVARCHARcolumns.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.x- aReaderthat specifies the new column valuelength- alongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value. The data is read from the stream as needed until end-of-stream is reached. The driver does the necessary conversion from Java character format to the national character set in the database. It is intended for use when updatingNCHAR,NVARCHARandLONGNVARCHARcolumns.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column value- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNCharacterStream
public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with a character stream value, which is the specified number of bytes. The driver does the necessary conversion from Java character format to the national character set in the database. It is intended for use when updatingNCHAR,NVARCHARandLONGNVARCHARcolumns.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat specifies the new column valuelength- alongthat specifies the length of the stream- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNClob
public void updateNClob(int columnIndex, NClob nClob) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.NClobvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.nClob- anNClobthat specifies the value for the column to be updated- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNClob
public void updateNClob(int columnIndex, Reader reader) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReader. The data is read from the stream as needed until end-of-stream is reached. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.reader- aReaderthat contains the data to set the parameter value to- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNClob
public void updateNClob(int columnIndex, Reader reader, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject, which is the given number of characters long. When a very large UNICODE value is input to aLONGVARCHARparameter, it may be more practical to send it via ajava.io.Readerobject. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.reader- aReaderthat contains the data to set the parameter value tolength- alongthat specifies the number of characters in the parameter data- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNClob
public void updateNClob(String columnLabel, NClob nClob) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column with ajava.sql.NClobvalue.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.nClob- aNClobthat specifies the value for the column to be updated- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNClob
public void updateNClob(String columnLabel, Reader reader) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject. The data is read from the stream as needed until end-of-stream is reached. The JDBC driver does any necessary conversion from UNICODE to the database char format.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat contains the data to set the parameter value to- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
updateNClob
public void updateNClob(String columnLabel, Reader reader, long length) throws AbstractFlatFile.FlatFileSQLFeatureNotSupportedException Updates the designated column using the givenReaderobject, which is the given number of characters long. When a very large UNICODE value is input to aLONGVARCHARparameter, it may be more practical to send it via ajava.io.Readerobject. The JDBC driver does any necessary conversion from UNICODE to the databasecharformat.The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database. Instead the
updateRoworinsertRowmethods are called to update the database.- Parameters:
columnLabel- aStringthat indicates the label for the column specified with the SQLASclause. If the SQLASclause was not specified, then the label is the name of the column.reader- aReaderthat contains the data to set the parameter value tolength- alongthat specifies the number of characters in the parameter data- Throws:
AbstractFlatFile.FlatFileSQLFeatureNotSupportedException- this feature has not been implemented
-
getObject
Gets the value of the designated column in the current row of this
ResultSetobject as anObjectin the Java programming language.This method returns the value of the given column as a Java object. The type of the Java object is the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification.
This method may also be used to read datatabase-specific abstract data types. In the JDBC 2.0 API, the behavior of method
getObjectis extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to:getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).- Specified by:
getObjectin interfaceResultSet- Specified by:
getObjectin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- a
java.lang.Objectholding the column value - Throws:
SQLException- if a database access error occurs
-
readLine
Reads and returns a line from the input.- Returns:
- a
Stringthat contains a line from the input - Throws:
IOException- thrown if an IO exception occurs
-
setColumnClass
Sets a column class.- Overrides:
setColumnClassin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.columnClass- aClassobject used to specify the class of the data in the column
-
setColumnParser
Sets the Parser for the specified column.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.columnParser- aParserthat is the parser to be used to parse entries in the specified column
-
setDateColumnParser
Creates for a pattern string and sets the Parser for the specified column.- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.pattern- aStringthat specifies a pattern used to construct ajava.text.SimpleDateFormatobject used to parse the columnlocale- aLocalethat specifies the locale for the date format parser
-
doNext
Moves the cursor down one row from its current position. AResultSetcursor is initially positioned before the first row, the first call to the methodnextmakes the first row the current row, the second call makes the second row the current row, and so on.- Specified by:
doNextin classAbstractFlatFile- Returns:
- a
boolean,trueif the new current row is valid,falseif there are no more rows - Throws:
SQLException- if a database access error occurs
-
doGetBytes
Gets the value of the designated column in the current row as abytearray.- Specified by:
doGetBytesin classAbstractFlatFile- Parameters:
columnIndex- anintthat specifies the column. The first column is 1, the second 2, and so on.- Returns:
- a
bytearray that contains the column value. If the value is SQLNULL, the value returned isnull. - Throws:
SQLException- if a database access error occurs
-
getColumnCount
Returns the number of columns in thisResultSetobject.- Specified by:
getColumnCountin classAbstractFlatFile- Returns:
- an
intthat specifies the number of columns - Throws:
SQLException- if a database access error occurs
-