Package org.terrier.utility.io

Examples of org.terrier.utility.io.CountingInputStream


    start = offset;
   
    if (codec !=null)
    {
      start = 0;
      inputStream = new CountingInputStream(_input);
      internalInputStream = codec.createInputStream(inputStream);
    }
    else
    {
      if (start != 0) //TODO: start is always zero?
      {
            --start;
            _input.seek(start);
      }
      internalInputStream = inputStream = new CountingInputStream(_input, start);
    }
    Collection rtr = CollectionFactory.loadCollection(
      ApplicationSetup.getProperty("trec.collection.class", "TRECCollection"),
      new Class[]{InputStream.class},
      new Object[]{internalInputStream});
View Full Code Here


    readDocumentBlacklist(ApplicationSetup.makeAbsolute(
      ApplicationSetup.getProperty("trec.blacklist.docids", ""),
    ApplicationSetup.TERRIER_ETC));
   
     
    br = input instanceof CountingInputStream ? (CountingInputStream)input : new CountingInputStream(input);
    documentsInThisFile = 0;
  }
View Full Code Here

        {
          //logger.warn("Could not open "+filename+" : Cannot read");
        }
        else
        //filename seems ok, open it
          br = new CountingInputStream(Files.openFileStream(filename)); //throws an IOException, throw upwards
          //logger.info("Processing "+filename);
          currentFilename = filename;
          //no need to loop again
          tryFile = false;
          //return success
View Full Code Here

TOP

Related Classes of org.terrier.utility.io.CountingInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.