Java Utililty Methods SQL ResultSet Byte Read

List of utility methods to do SQL ResultSet Byte Read

Description

The list of methods to do SQL ResultSet Byte Read are organized into topic(s).

Method

BytegetByte(ResultSet resultSet, String columnName)
Returns a byte value using a given SQL result set and column name.
Byte value = null;
if (resultSet != null && columnName != null) {
    byte columnValue = resultSet.getByte(columnName);
    if (!resultSet.wasNull()) {
        value = new Byte(columnValue);
return value;
...
bytegetByte(ResultSet rs, int column)
get a byte from ResultSet rs with name 'column'
byte i = rs.getByte(column);
if (rs.wasNull())
    i = 0;
return i;
BytegetByteFromResultSet(ResultSet rs, String db_name)
get Byte From Result Set
byte n = rs.getByte(db_name);
return rs.wasNull() ? null : Byte.valueOf(n);
ListgetByteList(ResultSet resultSet, String columnName)
Returns a list of byte values using a given SQL result set and column name.
List<Byte> values = null;
if (resultSet != null && columnName != null) {
    values = new ArrayList<Byte>();
    while (resultSet.next()) {
        values.add(getByte(resultSet, columnName));
return values;
...
byte[]getBytes(ResultSet res, String name)
Returns the values of the specified column as a byte array.
byte[] v = res.getBytes(name);
return res.wasNull() ? null : v;
ListgetByteStreamList(ResultSet resultSet, String columnName)
Returns a list of byte stream values using a given SQL result set and column name.
List<byte[]> values = null;
if (resultSet != null && columnName != null) {
    values = new ArrayList<byte[]>();
    while (resultSet.next()) {
        values.add(getByteStream(resultSet, columnName));
return values;
...