1 32 33 package com.hp.hpl.jena.shared.wg; 34 35 36 import java.io.*; 37 import java.util.zip.*; 38 39 45 class LazyZipEntryInputStream extends LazyInputStream { 46 47 private ZipEntry entry; 48 private ZipFile zip; 49 50 LazyZipEntryInputStream(ZipFile zip,String name) { 51 entry = new ZipEntry(name); 53 this.zip = zip; 54 } 55 56 57 InputStream open() throws IOException { 58 InputStream rslt = zip.getInputStream(entry); 59 if ( rslt == null ) 60 throw new IllegalArgumentException (entry.getName()+ " cannot be opened."); 61 return rslt; 62 } 63 64 65 66 } 67 | Popular Tags |