Package org.archive.io.warc

Examples of org.archive.io.warc.WARCRecord.available()


   */
  private void replayRecord(WARCReader warcReader) throws IOException {
    warcReader.setStrict(true);
    WARCRecord warcRecord = (WARCRecord) warcReader.get(this.offset);
      byte[] buffer = new byte[BUFFER_SIZE];
      if (warcRecord.available() > 0) {
        int r = -1;
        while((r = warcRecord.read(buffer, 0, BUFFER_SIZE)) != -1) {
          System.out.write(buffer, 0, r);
        }
      }
View Full Code Here


        while((r = warcRecord.read(buffer, 0, BUFFER_SIZE)) != -1) {
          System.out.write(buffer, 0, r);
        }
      }
    System.out.println("record bytes available: "
        + warcRecord.available());
  }

  /**
   * wayback-like index an ARC record at offset
   * @param arcReader an ARCReader instance
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.