1 30 31 32 package org.hsqldb.scriptio; 33 34 import java.io.BufferedInputStream ; 35 import java.io.DataInputStream ; 36 import java.io.IOException ; 37 import java.io.InputStream ; 38 import java.util.zip.Inflater ; 39 import java.util.zip.InflaterInputStream ; 40 41 import org.hsqldb.Database; 42 import org.hsqldb.HsqlException; 43 44 50 class ScriptReaderZipped extends ScriptReaderBinary { 51 52 ScriptReaderZipped(Database db, 53 String file) throws HsqlException, IOException { 54 super(db, file); 55 } 56 57 protected void openFile() throws IOException { 58 59 InputStream d = db.isFilesInJar() 60 ? getClass().getResourceAsStream(fileName) 61 : db.getFileAccess().openInputStreamElement(fileName); 62 63 dataStreamIn = new DataInputStream ( 64 new BufferedInputStream ( 65 new InflaterInputStream (d, new Inflater ()), 1 << 13)); 66 } 67 } 68 | Popular Tags |