protected int status = 0;
public static Resource getResource(InputStream rin, long offset) throws IOException, ResourceNotAvailableException {
JWATResource r = new JWATResource();
r.pbin = new ByteCountingPushBackInputStream(rin, 32);
ByteCountingPushBackInputStream in = null;
if (GzipReader.isGzipped(r.pbin)) {
r.gzipReader = new GzipReader(r.pbin);
if ( (r.gzipEntry = r.gzipReader.getNextEntry()) != null ) {
in = new ByteCountingPushBackInputStream(new BufferedInputStream( r.gzipEntry.getInputStream(), 8192), 32);
} else {
throw new ResourceNotAvailableException("GZip entry is invalid");
}
}
else {