uk.ac.gla.dcs.renaissance.ir.collections
Class TRECInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by uk.ac.gla.dcs.renaissance.ir.collections.TRECInputStream
All Implemented Interfaces:
Closeable

public class TRECInputStream
extends InputStream

An input stream for TREC collections. The method next() should be used to get the input stream ready.

Author:
Benjamin Piwowarski

Nested Class Summary
static class TRECInputStream.DocumentIterator
          For each input stream, produces a list of input streams
 
Constructor Summary
TRECInputStream(InputStream is)
           
 
Method Summary
static void main(String[] args)
           
 boolean next()
          Position the stream to the next document
 int read()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TRECInputStream

public TRECInputStream(InputStream is)
Method Detail

next

public boolean next()
             throws IOException
Position the stream to the next document

Throws:
IOException

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


Copyright © 2011. All Rights Reserved.