title: How to tail a file with rx-java?
body: <p>Using the <code>rx-java</code> package, how can I <a href="https://stackoverflow.com/q/32646260/262852">tail</a> a file?</p>
  
  <p>code:</p>
  
  <pre><code>package tail;
  
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.util.logging.Logger;
  
  public class FileUtils {
  
      public FileUtils() {
      }
  
      public void readFromInputStream(InputStream inputStream)
              throws IOException {
          StringBuilder resultStringBuilder = new StringBuilder();
          try (BufferedReader br
                  = new BufferedReader(new InputStreamReader(inputStream))) {
              String line;
              while ((line = br.readLine()) != null) {
                  resultStringBuilder.append(line).append("\n");
              }
          }
          System.out.println(resultStringBuilder);
      }
  
  }
  </code></pre>
  
  <p>I'd want to parse <a href="https://stackoverflow.com/q/20663255/262852">each line</a> as its written to the file.  First, need an <a href="https://stackoverflow.com/q/557844/262852">equivalent</a> to <code>tail -f foo.log</code> from Java.</p>