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
    • 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>
        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)