Package org.tamacat.dao.rdb.util

Source Code of org.tamacat.dao.rdb.util.BlobUtils

package org.tamacat.dao.rdb.util;

import java.io.InputStream;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import org.tamacat.dao.DaoException;

public class BlobUtils {
 
  public static int executeUpdate(PreparedStatement stmt,
      int index, InputStream in) throws DaoException {
    try {
      stmt.setBinaryStream(index, in);
      return stmt.executeUpdate();
    } catch (SQLException e) {
      throw new DaoException(e);
    }
  }
}
TOP

Related Classes of org.tamacat.dao.rdb.util.BlobUtils

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.