Codota Logo
CaptureSearchResult.toString
Code IndexAdd Codota to your IDE (free)

How to use
toString
method
in
org.archive.wayback.core.CaptureSearchResult

Best Java code snippets using org.archive.wayback.core.CaptureSearchResult.toString (Showing top 3 results out of 315)

  • Common ways to obtain CaptureSearchResult
private void myMethod () {
CaptureSearchResult c =
  • Codota Iconnew CaptureSearchResult()
  • Smart code suggestions by Codota
}
origin: lintool/warcbase

@Override
public Resource retrieveResource(CaptureSearchResult result) throws ResourceNotAvailableException {
 Resource r = null;
 String resourceUrl = "http://" + host + ":" + port + "/" + table + "/"
   + ArchiveUtils.get14DigitDate(result.getCaptureDate()) + "/" + result.getOriginalUrl();
 LOGGER.info("Fetching resource url: " + resourceUrl);
 try {
  // Read first 4 bytes of input stream to detect archive format; push back into stream for re-use
  PushbackInputStream pb = new PushbackInputStream(new URL(resourceUrl).openStream(), 4);
  byte[] signature = new byte[4];
  pb.read(signature, 0, 4);
  pb.unread(signature);
  if ((new String(signature)).equals("WARC")) {
   WARCReader reader = (WARCReader) WARCReaderFactory.get(resourceUrl.toString(), pb, false);
   r = ResourceFactory.WARCArchiveRecordToResource(reader.get(), reader);
  } else {
   // Assume ARC format if not WARC
   ARCReader reader = (ARCReader) ARCReaderFactory.get(resourceUrl.toString(), pb, false);
   r = ResourceFactory.ARCArchiveRecordToResource(reader.get(), reader);
  }
 } catch (IOException e) {
  throw new ResourceNotAvailableException("Error reading " + resourceUrl);
 }
 if (r == null) {
  throw new ResourceNotAvailableException("Unable to find: " + result.toString());
 }
 return r;
}
origin: iipc/openwayback

throw new ResourceNotAvailableException("Revisit: Missing original for revisit record " + closest.toString(), 404);
origin: org.netpreserve.openwayback/openwayback-core

throw new ResourceNotAvailableException("Revisit: Missing original for revisit record " + closest.toString(), 404);
org.archive.wayback.coreCaptureSearchResulttoString

Popular methods of CaptureSearchResult

  • <init>
  • setUrlKey
  • getOriginalUrl
  • setFile
  • setHttpCode
  • setMimeType
  • setOffset
  • setOriginalUrl
  • flagDuplicateDigest
    Mark this capture as a revisit of previous capture payload, identified by content digest.Record loca
  • getCaptureDate
  • getCaptureTimestamp
  • getDigest
  • getCaptureTimestamp,
  • getDigest,
  • getDuplicatePayload,
  • getDuplicatePayloadCompressedLength,
  • getDuplicatePayloadFile,
  • getDuplicatePayloadOffset,
  • getFile,
  • getOffset,
  • getRobotFlags,
  • getUrlKey

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • putExtra (Intent)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • LinkedHashMap (java.util)
    Hash table and linked list implementation of the Map interface, with predictable iteration order. Th
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now