图片,文件流的简单使用
public void getBlob() throws Exception {
OutputStream os = null;
InputStream is = null;
ResultSet rs = null;
try {
// rs = this.query("select FACEFILE from t_wepec_user where sysid='4784' ");
is = new FileInputStream("D:\\img\\yy.jpg");
// while (rs.next()){
// is = rs.getBinaryStream(1);
// Blob blob = rs.getBlob(1);
// is = blob.getBinaryStream();
OutputStream out = new FileOutputStream("D:\\img\\narcissus1.jpg");
byte[] buffer = new byte[1024];
int i = 0;
while((i = is.read(buffer)) != -1){
out.write(buffer, 0, i);
}
// }
// List