public class ByteArrayColumnTranslator extends ColumnWriterWithCharEncoding
Note that this is a largely redundant translator and is only included for completeness; the column types that will be used are generally going to be BLOB or CLOB; I wouldn't really expect to see many types that have to be explicitly treated as a byte array
In the adapter configuration file this class is aliased as jdbc-type-byte-array-column-translator which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
ByteArrayColumnTranslator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
translate(JdbcResultRow rs,
int column)
Translate the column into a String.
|
java.lang.String |
translate(JdbcResultRow rs,
java.lang.String columnName)
Translate the column into a String.
|
void |
write(JdbcResultRow rs,
int column,
java.io.OutputStream out)
Write the column into the specified outputstream.
|
void |
write(JdbcResultRow rs,
java.lang.String columnName,
java.io.OutputStream out)
Write the column into the specified outputstream.
|
getCharacterEncoding, setCharacterEncoding, toReader
public java.lang.String translate(JdbcResultRow rs, int column) throws java.sql.SQLException, java.io.IOException
ColumnTranslator
rs
- the result setcolumn
- the column indexjava.sql.SQLException
java.io.IOException
public java.lang.String translate(JdbcResultRow rs, java.lang.String columnName) throws java.sql.SQLException, java.io.IOException
ColumnTranslator
rs
- the result setcolumnName
- the column namejava.sql.SQLException
java.io.IOException
public void write(JdbcResultRow rs, int column, java.io.OutputStream out) throws java.sql.SQLException, java.io.IOException
ColumnWriter
rs
- the result setcolumn
- the column indexout
- the outputstreamjava.sql.SQLException
java.io.IOException
public void write(JdbcResultRow rs, java.lang.String columnName, java.io.OutputStream out) throws java.sql.SQLException, java.io.IOException
ColumnWriter
rs
- the result setcolumnName
- the column nameout
- the outputstreamjava.sql.SQLException
java.io.IOException