Package org.archive.io.arc

Examples of org.archive.io.arc.ARCRecord.available()


      arcRecord.skipHttpHeader();
      if (arcRecord.hasErrors()) {
        logger.warning("record has errors: " + arcRecord.getErrors());
      }
      byte[] buffer = new byte[BUFFER_SIZE];
      if (arcRecord.available() > 0) {
        // for (int r = -1; (r = arcRecord.read(buffer, 0, BUFFER_SIZE)) != -1;) {
        int r = -1;
        while((r = arcRecord.read(buffer, 0, BUFFER_SIZE)) != -1) {
          // os.write(buffer, 0, r);
          System.out.write(buffer, 0, r);
View Full Code Here


          // os.write(buffer, 0, r);
          System.out.write(buffer, 0, r);
        }
      } else {
        System.out.println("record bytes available: "
            + arcRecord.available());
      }
  }
 
  /**
   * wayback-like replay of WARC record at offset
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.