Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.factual.driver;
Represents a streaming request where the response is provided through the a callback

public class FactualStream {
  private final BufferedReader br;
  private final LineCallback cb;
  public FactualStream(BufferedReader brLineCallback cb) {
    this. = br;
    this. = cb;

Start reading the response line by line. This is a blocking call.
  public void start() {
    String line = null;
    StringBuffer sb = new StringBuffer();
    try {
      while ((line = .readLine()) != null) {
        if ( != null)
    } catch (IOException e) {

Terminate the request
  public void end() {
New to GrepCode? Check out our FAQ X