Codota Logo
RecordingInputStream.readFullyOrUntil
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: internetarchive/heritrix3

/**
 * Saves the given socket to the given recorder.
 * 
 * @param curi      the curi that owns the recorder
 * @param socket    the socket whose streams to save
 * @param recorder  the recorder to save them to
 * @throws IOException  if a network or file error occurs
 * @throws InterruptedException  if the thread is interrupted
 */
private void saveToRecorder(CrawlURI curi,
    Socket socket, Recorder recorder) 
throws IOException, InterruptedException {
  recorder.inputWrap(socket.getInputStream());
  recorder.outputWrap(socket.getOutputStream());
  recorder.markContentBegin();
  // Read the remote file/dir listing in its entirety.
  long softMax = 0;
  long hardMax = getMaxLengthBytes();
  long timeout = (long)getTimeoutSeconds() * 1000L;
  int maxRate = getMaxFetchKBSec();
  RecordingInputStream input = recorder.getRecordedInput();
  input.setLimits(hardMax, timeout, maxRate); 
  input.readFullyOrUntil(softMax);
}

origin: org.archive.heritrix/heritrix-modules

/**
 * Saves the given socket to the given recorder.
 * 
 * @param curi      the curi that owns the recorder
 * @param socket    the socket whose streams to save
 * @param recorder  the recorder to save them to
 * @throws IOException  if a network or file error occurs
 * @throws InterruptedException  if the thread is interrupted
 */
private void saveToRecorder(CrawlURI curi,
    Socket socket, Recorder recorder) 
throws IOException, InterruptedException {
  recorder.inputWrap(socket.getInputStream());
  recorder.outputWrap(socket.getOutputStream());
  recorder.markContentBegin();
  // Read the remote file/dir listing in its entirety.
  long softMax = 0;
  long hardMax = getMaxLengthBytes();
  long timeout = (long)getTimeoutSeconds() * 1000L;
  int maxRate = getMaxFetchKBSec();
  RecordingInputStream input = recorder.getRecordedInput();
  input.setLimits(hardMax, timeout, maxRate); 
  input.readFullyOrUntil(softMax);
}

org.archive.ioRecordingInputStreamreadFullyOrUntil

Javadoc

Read all of a stream (Or read until we timeout or have read to the max).

Popular methods of RecordingInputStream

  • getReplayInputStream
  • 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
  • markContentBegin,
  • open,
  • read,
  • chopAtMessageBodyBegin,
  • getContentBegin,
  • getDigestValue,
  • readToEndOfContent,
  • setDigest,
  • setLimits

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
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