congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CaptureSearchResult.toString
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • Kernel (java.awt.image)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ImageIO (javax.imageio)
  • JComboBox (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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