Package it.unimi.dsi.fastutil.io

Examples of it.unimi.dsi.fastutil.io.FastBufferedInputStream.readLine()


    currInter = 0;
    oldPos = 0;
   
    int l;
   
    while ( ( l = fbis.readLine( buffer ) ) != -1 ) {
      if ( l == buffer.length ) {
        // We filled the buffer, which means we have a very very long line. Let's skip it.
        while ( ( l = fbis.readLine( buffer ) ) == buffer.length );
      }
      else {
View Full Code Here


    int l;
   
    while ( ( l = fbis.readLine( buffer ) ) != -1 ) {
      if ( l == buffer.length ) {
        // We filled the buffer, which means we have a very very long line. Let's skip it.
        while ( ( l = fbis.readLine( buffer ) ) == buffer.length );
      }
      else {
        if ( !startedBlock && equals( buffer, l, DOC_OPEN ) ) {
          currStart = oldPos;
          startedBlock = true; // Start of the current block (includes <DOC> marker)
View Full Code Here

   
    final FastBufferedInputStream fbis = new FastBufferedInputStream( rawContent );
    int startedHeader = 0; // 0 == false, 1 == true, 2 === header started and uri collected
    boolean foundDocNo = false;
   
    int l = fbis.readLine( buffer );
    if ( l < 0 ) throw new EOFException();
    if ( ! TRECDocumentCollection.equals( buffer, l, DOC_OPEN  ) ) throw new IllegalStateException ( "Document does not start with <DOC>: " + new String( buffer, 0, l ) );
   
    while ( ( l = fbis.readLine( buffer ) ) != -1 ) {
      if ( !foundDocNo && startsWith( buffer, l, DOCNO_OPEN ) ) {
View Full Code Here

   
    int l = fbis.readLine( buffer );
    if ( l < 0 ) throw new EOFException();
    if ( ! TRECDocumentCollection.equals( buffer, l, DOC_OPEN  ) ) throw new IllegalStateException ( "Document does not start with <DOC>: " + new String( buffer, 0, l ) );
   
    while ( ( l = fbis.readLine( buffer ) ) != -1 ) {
      if ( !foundDocNo && startsWith( buffer, l, DOCNO_OPEN ) ) {
        foundDocNo = true;
        metadata.put( MetadataKeys.TITLE, new String( buffer, DOCNO_OPEN.length, l - ( DOCNO_OPEN.length + DOCNO_CLOSE.length ) ) );
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.