BLOB を含むデータベースがあり、このデータベース内にパスワードで保護された zip があり、従来から見ている標準のファイル オブジェクト アプローチを使用しています。
File zipFile = new File("C:\\file.zip");
net.lingala.zip4j.core.ZipFile table = new net.lingala.zip4j.core.ZipFile(zipFile);
if (table.isEncrypted())
table.setPassword(password);
net.lingala.zip4j.model.FileHeader entry = table.getFileHeader("file_inside_the_zip.txt");
return table.getInputStream(entry); //Decrypted inputsteam!
私の質問は、一時ファイルを使用せずにこのようなものを実装し、ブロブだけの入力ストリームを純粋に取得する方法です。これまでのところ、このようなものがあります
InputStream zipStream = getFileFromDataBase("stuff.zip");
//This point forward I have to save zipStream as a temporary file and use the traditional code above