Examples of ByteCountingPushBackInputStream


Examples of org.jwat.common.ByteCountingPushBackInputStream

  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 {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.