Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.support.lob
Class AbstractLobHandler

    java.lang.Object
      org.springframework.jdbc.support.lob.AbstractLobHandler

All Implemented Interfaces:
  LobHandler

Direct Known Subclasses:
  DefaultLobHandler, OracleLobHandler

    public abstract class AbstractLobHandler

extends java.lang.Object
implements LobHandler

Abstract base class for LobHandler implementations.

Implements all accessor methods for column names through a column lookup and delegating to the corresponding accessor that takes a column index.

Since:
  1.2
Author:
  Juergen Hoeller
See Also:
  `ResultSet.findColumn(java.lang.String)`

Constructor Summary
`AbstractLobHandler()`

Method Summary
`java.io.InputStream` | `getBlobAsBinaryStream(java.sql.ResultSet rs, java.lang.String columnName)` Retrieve the given column as binary stream from the given ResultSet.
`byte[]` | `getBlobAsBytes(java.sql.ResultSet rs, java.lang.String columnName)` Retrieve the given column as bytes from the given ResultSet.
`java.io.InputStream` | `getClobAsAsciiStream(java.sql.ResultSet rs, java.lang.String columnName)` Retrieve the given column as ASCII stream from the given ResultSet.
`java.io.Reader` | `getClobAsCharacterStream(java.sql.ResultSet rs, java.lang.String columnName)` Retrieve the given column as character stream from the given ResultSet.
`java.lang.String` | `getClobAsString(java.sql.ResultSet rs, java.lang.String columnName)` Retrieve the given column as String from the given ResultSet.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.springframework.jdbc.support.lob.LobHandler
`getBlobAsBinaryStream, getBlobAsBytes, getClobAsAsciiStream, getClobAsCharacterStream, getClobAsString, getLobCreator`

Constructor Detail

### AbstractLobHandler

    public AbstractLobHandler()

Method Detail

### getBlobAsBytes

    public byte[] getBlobAsBytes(java.sql.ResultSet rs,
                                 java.lang.String columnName)
                          throws java.sql.SQLException

  Description copied from interface: `LobHandler`
  Retrieve the given column as bytes from the given ResultSet. Might simply invoke `ResultSet.getBytes` or work with `ResultSet.getBlob`, depending on the database and driver.

  Specified by:
    `getBlobAsBytes` in interface `LobHandler`
  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnName` - the column name to use
  Returns:
    the content as byte array, or `null` in case of SQL NULL
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getBytes(int)`

### getBlobAsBinaryStream

    public java.io.InputStream getBlobAsBinaryStream(java.sql.ResultSet rs,
                                                     java.lang.String columnName)
                                              throws java.sql.SQLException

  Description copied from interface: `LobHandler`
  Retrieve the given column as binary stream from the given ResultSet. Might simply invoke `ResultSet.getBinaryStream` or work with `ResultSet.getBlob`, depending on the database and driver.

  Specified by:
    `getBlobAsBinaryStream` in interface `LobHandler`
  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnName` - the column name to use
  Returns:
    the content as binary stream, or `null` in case of SQL NULL
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getBinaryStream(int)`

### getClobAsString

    public java.lang.String getClobAsString(java.sql.ResultSet rs,
                                            java.lang.String columnName)
                                     throws java.sql.SQLException

  Description copied from interface: `LobHandler`
  Retrieve the given column as String from the given ResultSet. Might simply invoke `ResultSet.getString` or work with `ResultSet.getClob`, depending on the database and driver.

  Specified by:
    `getClobAsString` in interface `LobHandler`
  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnName` - the column name to use
  Returns:
    the content as String, or `null` in case of SQL NULL
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getString(int)`

### getClobAsAsciiStream

    public java.io.InputStream getClobAsAsciiStream(java.sql.ResultSet rs,
                                                    java.lang.String columnName)
                                             throws java.sql.SQLException

  Description copied from interface: `LobHandler`
  Retrieve the given column as ASCII stream from the given ResultSet. Might simply invoke `ResultSet.getAsciiStream` or work with `ResultSet.getClob`, depending on the database and driver.

  Specified by:
    `getClobAsAsciiStream` in interface `LobHandler`
  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnName` - the column name to use
  Returns:
    the content as ASCII stream, or `null` in case of SQL NULL
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getAsciiStream(int)`

### getClobAsCharacterStream

    public java.io.Reader getClobAsCharacterStream(java.sql.ResultSet rs,
                                                   java.lang.String columnName)
                                            throws java.sql.SQLException

  Description copied from interface: `LobHandler`
  Retrieve the given column as character stream from the given ResultSet. Might simply invoke `ResultSet.getCharacterStream` or work with `ResultSet.getClob`, depending on the database and driver.

  Specified by:
    `getClobAsCharacterStream` in interface `LobHandler`
  Parameters:
    `rs` - the ResultSet to retrieve the content from
    `columnName` - the column name to use
  Returns:
    the content as character stream
  Throws:
    `java.sql.SQLException` - if thrown by JDBC methods
  See Also:
    `ResultSet.getCharacterStream(int)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD