Class StringReadChannel


  • public class StringReadChannel
    extends java.lang.Object
    StringReadChannel 2007 MvK: Start implementation 25.06.2009 MvK: implementation changed 12.02.2014 MvK: added charset encoding to handle Umlaute. 24.04.2014 MvK: Pipeline replaced simple LinkedList because of needed concurrent access. 29.01.2015 MvK: Increased capacity CAPACITY_LINE_BUFFER to 10,000,000 because of overflow when reading PubMed records. 03.06.2015 MvK: Increased capacity CAPACITY_LINE_BUFFER to 50,000,000 because of overflow when reading g2dDiseasePublicationSlope.dwar
    • Constructor Detail

      • StringReadChannel

        public StringReadChannel​(java.nio.channels.ReadableByteChannel ch)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • hasMoreLines

        public boolean hasMoreLines()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • readLine

        public java.lang.String readLine()
                                  throws java.io.IOException
        Returns:
        null if EOF reached.
        Throws:
        java.io.IOException
      • finalize

        public void finalize()
                      throws java.io.IOException
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.io.IOException
      • skipUntilLineMatchesRegEx

        public static void skipUntilLineMatchesRegEx​(StringReadChannel src,
                                                     java.lang.String regex)
                                              throws java.lang.NoSuchFieldException,
                                                     java.io.IOException
        Throws:
        java.lang.NoSuchFieldException
        java.io.IOException
      • skipUntilLineMatchesRegEx

        public static java.lang.String skipUntilLineMatchesRegEx​(StringReadChannel src,
                                                                 java.lang.String regex,
                                                                 int limit)
                                                          throws java.lang.NoSuchFieldException,
                                                                 java.io.IOException
        Throws:
        java.lang.NoSuchFieldException
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException