Class BlobInputStreamTypeHandler

  • All Implemented Interfaces:
    TypeHandler<java.io.InputStream>

    public class BlobInputStreamTypeHandler
    extends BaseTypeHandler<java.io.InputStream>
    The TypeHandler for Blob/InputStream using method supported at JDBC 4.0.
    Since:
    3.4.0
    Author:
    Kazuki Shimizu
    • Method Summary

      Modifier and Type Method Description
      java.io.InputStream getNullableResult​(java.sql.CallableStatement cs, int columnIndex)
      Get an InputStream that corresponds to a specified column index from CallableStatement.
      java.io.InputStream getNullableResult​(java.sql.ResultSet rs, int columnIndex)
      Get an InputStream that corresponds to a specified column index from ResultSet.
      java.io.InputStream getNullableResult​(java.sql.ResultSet rs, java.lang.String columnName)
      Get an InputStream that corresponds to a specified column name from ResultSet.
      void setNonNullParameter​(java.sql.PreparedStatement ps, int i, java.io.InputStream parameter, JdbcType jdbcType)
      Set an InputStream into PreparedStatement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BlobInputStreamTypeHandler

        public BlobInputStreamTypeHandler()
    • Method Detail

      • setNonNullParameter

        public void setNonNullParameter​(java.sql.PreparedStatement ps,
                                        int i,
                                        java.io.InputStream parameter,
                                        JdbcType jdbcType)
                                 throws java.sql.SQLException
        Set an InputStream into PreparedStatement.
        Specified by:
        setNonNullParameter in class BaseTypeHandler<java.io.InputStream>
        Throws:
        java.sql.SQLException
        See Also:
        PreparedStatement.setBlob(int, InputStream)
      • getNullableResult

        public java.io.InputStream getNullableResult​(java.sql.ResultSet rs,
                                                     java.lang.String columnName)
                                              throws java.sql.SQLException
        Get an InputStream that corresponds to a specified column name from ResultSet.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.io.InputStream>
        columnName - Colunm name, when configuration useColumnLabel is false
        Throws:
        java.sql.SQLException
        See Also:
        ResultSet.getBlob(String)
      • getNullableResult

        public java.io.InputStream getNullableResult​(java.sql.ResultSet rs,
                                                     int columnIndex)
                                              throws java.sql.SQLException
        Get an InputStream that corresponds to a specified column index from ResultSet.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.io.InputStream>
        Throws:
        java.sql.SQLException
        See Also:
        ResultSet.getBlob(int)
      • getNullableResult

        public java.io.InputStream getNullableResult​(java.sql.CallableStatement cs,
                                                     int columnIndex)
                                              throws java.sql.SQLException
        Get an InputStream that corresponds to a specified column index from CallableStatement.
        Specified by:
        getNullableResult in class BaseTypeHandler<java.io.InputStream>
        Throws:
        java.sql.SQLException
        See Also:
        CallableStatement.getBlob(int)