congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RecordingInputStream.getReplayInputStream
Code IndexAdd Tabnine to your IDE (free)

How to use
getReplayInputStream
method
in
org.archive.io.RecordingInputStream

Best Java code snippets using org.archive.io.RecordingInputStream.getReplayInputStream (Showing top 19 results out of 315)

origin: internetarchive/heritrix3

if (shouldWrite(curi)) {
  ris = curi.getRecorder().getRecordedInput()
      .getReplayInputStream();
  return write(curi, recordLength, ris, getHostAddress(curi));
} else {
origin: internetarchive/heritrix3

String boundary = BOUNDARY_START + stringToMD5(curi.toString());
ris = curi.getRecorder().getRecordedInput().
  getReplayInputStream();
out = initOutputStream(curi);
origin: internetarchive/heritrix3

  curi.getRecorder().getRecordedInput().getReplayInputStream();
recordInfo.setContentStream(ris);
origin: internetarchive/heritrix3

protected void writeWhoisRecords(WARCWriter w, CrawlURI curi, URI baseid,
    String timestamp) throws IOException {
  WARCRecordInfo recordInfo = new WARCRecordInfo();
  recordInfo.setType(WARCRecordType.response);
  recordInfo.setUrl(curi.toString());
  recordInfo.setCreate14DigitDate(timestamp);
  recordInfo.setMimetype(curi.getContentType());
  recordInfo.setRecordId(baseid);
  recordInfo.setContentLength(curi.getRecorder().getRecordedInput().getSize());
  recordInfo.setEnforceLength(true);
  
  Object whoisServerIP = curi.getData().get(CoreAttributeConstants.A_WHOIS_SERVER_IP);
  if (whoisServerIP != null) {
    recordInfo.addExtraHeader(HEADER_KEY_IP, whoisServerIP.toString());
  }
  
  ReplayInputStream ris =
    curi.getRecorder().getRecordedInput().getReplayInputStream();
  recordInfo.setContentStream(ris);
  
  try {
    w.writeRecord(recordInfo);
  } finally {
    IOUtils.closeQuietly(ris);
  }
  recordInfo.getRecordId();
}
origin: internetarchive/heritrix3

ReplayInputStream ris = curi.getRecorder().getRecordedInput().getReplayInputStream();
recordInfo.setContentStream(ris);
origin: internetarchive/heritrix3

protected void writeDnsRecords(final CrawlURI curi, WARCWriter w,
    final URI baseid, final String timestamp) throws IOException {
  WARCRecordInfo recordInfo = new WARCRecordInfo();
  recordInfo.setType(WARCRecordType.response);
  recordInfo.setUrl(curi.toString());
  recordInfo.setCreate14DigitDate(timestamp);
  recordInfo.setMimetype(curi.getContentType());
  recordInfo.setRecordId(baseid);
  
  recordInfo.setContentLength(curi.getRecorder().getRecordedInput().getSize());
  recordInfo.setEnforceLength(true);
  
  String ip = (String)curi.getData().get(A_DNS_SERVER_IP_LABEL);
  if (ip != null && ip.length() > 0) {
    recordInfo.addExtraHeader(HEADER_KEY_IP, ip);
  }
  
  ReplayInputStream ris =
    curi.getRecorder().getRecordedInput().getReplayInputStream();
  recordInfo.setContentStream(ris);
  
  try {
    w.writeRecord(recordInfo);
  } finally {
    IOUtils.closeQuietly(ris);
  }
  
  recordInfo.getRecordId();
}
origin: internetarchive/heritrix3

protected URI writeResource(final WARCWriter w,
    final String timestamp, final String mimetype,
    final URI baseid, final CrawlURI curi,
    final ANVLRecord namedFields) 
throws IOException {
  WARCRecordInfo recordInfo = new WARCRecordInfo();
  recordInfo.setType(WARCRecordType.resource);
  recordInfo.setUrl(curi.toString());
  recordInfo.setCreate14DigitDate(timestamp);
  recordInfo.setMimetype(mimetype);
  recordInfo.setRecordId(baseid);
  recordInfo.setExtraHeaders(namedFields);
  recordInfo.setContentLength(curi.getRecorder().getRecordedInput().getSize());
  recordInfo.setEnforceLength(true);
  
  ReplayInputStream ris = curi.getRecorder().getRecordedInput().getReplayInputStream();
  recordInfo.setContentStream(ris);
  try {
    w.writeRecord(recordInfo);
  } finally {
    IOUtils.closeQuietly(ris);
  }
  
  return recordInfo.getRecordId();
}
origin: org.netpreserve.commons/webarchive-commons

/**
 * Get a raw replay of all recorded data (including, for example, HTTP 
 * protocol headers)
 * 
 * @return A replay input stream.
 * @throws IOException
 */
public ReplayInputStream getReplayInputStream() throws IOException {
  return getRecordedInput().getReplayInputStream();
}

origin: org.netpreserve.commons/commons-web

/**
 * Get a raw replay of all recorded data (including, for example, HTTP 
 * protocol headers)
 * 
 * @return A replay input stream.
 * @throws IOException
 */
public ReplayInputStream getReplayInputStream() throws IOException {
  return getRecordedInput().getReplayInputStream();
}

origin: iipc/webarchive-commons

/**
 * Get a raw replay of all recorded data (including, for example, HTTP 
 * protocol headers)
 * 
 * @return A replay input stream.
 * @throws IOException
 */
public ReplayInputStream getReplayInputStream() throws IOException {
  return getRecordedInput().getReplayInputStream();
}

origin: org.archive.heritrix/heritrix-modules

if (shouldWrite(curi)) {
  ris = curi.getRecorder().getRecordedInput()
      .getReplayInputStream();
  return write(curi, recordLength, ris, getHostAddress(curi));
} else {
origin: org.archive.heritrix/heritrix-modules

String boundary = BOUNDARY_START + stringToMD5(curi.toString());
ris = curi.getRecorder().getRecordedInput().
  getReplayInputStream();
out = initOutputStream(curi);
origin: iipc/openwayback

replayIS = ris.getReplayInputStream();
region = storeInputStreamARCRecord(writer, url, 
    getMethod.getMime(), getMethod.getRemoteIP(),
origin: org.netpreserve.openwayback/openwayback-core

replayIS = ris.getReplayInputStream();
region = storeInputStreamARCRecord(writer, url, 
    getMethod.getMime(), getMethod.getRemoteIP(),
origin: org.archive.heritrix/heritrix-modules

  curi.getRecorder().getRecordedInput().getReplayInputStream();
recordInfo.setContentStream(ris);
origin: org.archive.heritrix/heritrix-modules

protected void writeWhoisRecords(WARCWriter w, CrawlURI curi, URI baseid,
    String timestamp) throws IOException {
  WARCRecordInfo recordInfo = new WARCRecordInfo();
  recordInfo.setType(WARCRecordType.response);
  recordInfo.setUrl(curi.toString());
  recordInfo.setCreate14DigitDate(timestamp);
  recordInfo.setMimetype(curi.getContentType());
  recordInfo.setRecordId(baseid);
  recordInfo.setContentLength(curi.getRecorder().getRecordedInput().getSize());
  recordInfo.setEnforceLength(true);
  
  Object whoisServerIP = curi.getData().get(CoreAttributeConstants.A_WHOIS_SERVER_IP);
  if (whoisServerIP != null) {
    recordInfo.addExtraHeader(HEADER_KEY_IP, whoisServerIP.toString());
  }
  
  ReplayInputStream ris =
    curi.getRecorder().getRecordedInput().getReplayInputStream();
  recordInfo.setContentStream(ris);
  
  try {
    w.writeRecord(recordInfo);
  } finally {
    IOUtils.closeQuietly(ris);
  }
  recordInfo.getRecordId();
}
origin: org.archive.heritrix/heritrix-modules

ReplayInputStream ris = curi.getRecorder().getRecordedInput().getReplayInputStream();
recordInfo.setContentStream(ris);
origin: org.archive.heritrix/heritrix-modules

protected void writeDnsRecords(final CrawlURI curi, WARCWriter w,
    final URI baseid, final String timestamp) throws IOException {
  WARCRecordInfo recordInfo = new WARCRecordInfo();
  recordInfo.setType(WARCRecordType.response);
  recordInfo.setUrl(curi.toString());
  recordInfo.setCreate14DigitDate(timestamp);
  recordInfo.setMimetype(curi.getContentType());
  recordInfo.setRecordId(baseid);
  
  recordInfo.setContentLength(curi.getRecorder().getRecordedInput().getSize());
  recordInfo.setEnforceLength(true);
  
  String ip = (String)curi.getData().get(A_DNS_SERVER_IP_LABEL);
  if (ip != null && ip.length() > 0) {
    recordInfo.addExtraHeader(HEADER_KEY_IP, ip);
  }
  
  ReplayInputStream ris =
    curi.getRecorder().getRecordedInput().getReplayInputStream();
  recordInfo.setContentStream(ris);
  
  try {
    w.writeRecord(recordInfo);
  } finally {
    IOUtils.closeQuietly(ris);
  }
  
  recordInfo.getRecordId();
}
origin: org.archive.heritrix/heritrix-modules

protected URI writeResource(final WARCWriter w,
    final String timestamp, final String mimetype,
    final URI baseid, final CrawlURI curi,
    final ANVLRecord namedFields) 
throws IOException {
  WARCRecordInfo recordInfo = new WARCRecordInfo();
  recordInfo.setType(WARCRecordType.resource);
  recordInfo.setUrl(curi.toString());
  recordInfo.setCreate14DigitDate(timestamp);
  recordInfo.setMimetype(mimetype);
  recordInfo.setRecordId(baseid);
  recordInfo.setExtraHeaders(namedFields);
  recordInfo.setContentLength(curi.getRecorder().getRecordedInput().getSize());
  recordInfo.setEnforceLength(true);
  
  ReplayInputStream ris = curi.getRecorder().getRecordedInput().getReplayInputStream();
  recordInfo.setContentStream(ris);
  try {
    w.writeRecord(recordInfo);
  } finally {
    IOUtils.closeQuietly(ris);
  }
  
  return recordInfo.getRecordId();
}
org.archive.ioRecordingInputStreamgetReplayInputStream

Popular methods of RecordingInputStream

  • getSize
  • close
  • getMessageBodyReplayInputStream
  • getResponseContentLength
  • isOpen
  • <init>
    Create a new RecordingInputStream.
  • clearForReuse
  • closeRecorder
  • getRecordedBufferLength
    Expose the amount of in-memory buffering used by the internal recording stream.
  • markContentBegin
  • open
  • read
  • open,
  • read,
  • chopAtMessageBodyBegin,
  • getContentBegin,
  • getDigestValue,
  • readFullyOrUntil,
  • readToEndOfContent,
  • setDigest,
  • setLimits

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Path (java.nio.file)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now