//oracle db public static void writeToFile (BLOB b) throws Exception {
int chunk = b.getChunkSize();
byte[] buffer = new byte[chunk];
int length;
FileOutputStream outFile = null;
outFile = new FileOutputStream("out.jpg");
InputStream instream = b.getBinaryStream();
// Fetch data
while ((length = instream.read(buffer)) != -1) {
outFile.write(buffer, 0, length);
}
// Close input and output streams
instream.close();
outFile.close();
}
int chunk = b.getChunkSize();
byte[] buffer = new byte[chunk];
int length;
FileOutputStream outFile = null;
outFile = new FileOutputStream("out.jpg");
InputStream instream = b.getBinaryStream();
// Fetch data
while ((length = instream.read(buffer)) != -1) {
outFile.write(buffer, 0, length);
}
// Close input and output streams
instream.close();
outFile.close();
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货