private byte[] readPayloadColumn(ResultSet rows,int columnIndex) throws SQLException {
  String str;
  byte[] payload=EMPTY_DATA;
switch (options.contentDataType) {
case CollectionDescriptor.CLOB_CONTENT:
case CollectionDescriptor.CHAR_CONTENT:
    str=rows.getString(columnIndex);
  if (str != null)   payload=str.getBytes(ByteArray.DEFAULT_CHARSET);
break;
case CollectionDescriptor.NCLOB_CONTENT:
case CollectionDescriptor.NCHAR_CONTENT:
str=rows.getNString(columnIndex);
if (str != null) payload=str.getBytes(ByteArray.DEFAULT_CHARSET);
break;
case CollectionDescriptor.BLOB_CONTENT:
case CollectionDescriptor.RAW_CONTENT:
payload=rows.getBytes(columnIndex);
break;
}
return (payload);
}

private byte [ ] readPayloadColumn ( ResultSet rows , int columnIndex ) throws SQLException { String str ; byte [ ] payload = EMPTY_DATA ; switch ( options . contentDataType ) { case CollectionDescriptor . CLOB_CONTENT : case CollectionDescriptor . CHAR_CONTENT : str = rows . getString ( columnIndex ) ; if ( str != null ) payload = str . getBytes ( ByteArray . DEFAULT_CHARSET ) ; break ; case CollectionDescriptor . NCLOB_CONTENT : case CollectionDescriptor . NCHAR_CONTENT : str = rows . getNString ( columnIndex ) ; if ( str != null ) payload = str . getBytes ( ByteArray . DEFAULT_CHARSET ) ; break ; case CollectionDescriptor . BLOB_CONTENT : case CollectionDescriptor . RAW_CONTENT : payload = rows . getBytes ( columnIndex ) ; break ; } return ( payload ) ; }
read the payload column into a byte array .
