Package com.actelion.research.io
Class StringReadChannel
- java.lang.Object
-
- com.actelion.research.io.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 Summary
Constructors Constructor Description StringReadChannel(java.nio.channels.ReadableByteChannel ch)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
finalize()
boolean
hasMoreLines()
java.lang.String
readLine()
static void
skipUntilLineMatchesRegEx(StringReadChannel src, java.lang.String regex)
static java.lang.String
skipUntilLineMatchesRegEx(StringReadChannel src, java.lang.String regex, int limit)
-
-
-
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 classjava.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
-
-