Package picard.util

Class BasicInputParser

    • Constructor Detail

      • BasicInputParser

        public BasicInputParser​(boolean treatGroupedDelimitersAsOne,
                                InputStream... inputStreams)
        Constructor. Opens up a buffered reader and reads the first line.
        Parameters:
        inputStreams - the file(s) to parse, in order
      • BasicInputParser

        public BasicInputParser​(boolean treatGroupedDelimitersAsOne,
                                int wordCount,
                                InputStream... inputStreams)
      • BasicInputParser

        public BasicInputParser​(boolean treatGroupedDelimitersAsOne,
                                File... files)
        Constructor. Opens up a buffered reader and reads the first line.
        Parameters:
        files - the file(s) to parse, in order
      • BasicInputParser

        public BasicInputParser​(boolean treatGroupedDelimitersAsOne,
                                int wordCount,
                                File... files)
        Constructor. In addition to opening and priming the files, it sets the number of whitespace-separated "words" per line.
        Parameters:
        files - the file(s) to parse
        wordCount - number of whitespace-separated "words" per line
    • Method Detail

      • readNextLine

        protected byte[] readNextLine()
        Workhorse method that reads the next line from the underlying reader
        Specified by:
        readNextLine in class AbstractInputParser
        Returns:
        String or null if there is no next line
      • advanceFile

        protected void advanceFile()
      • getFileName

        public String getFileName()
        Gets the name of the file being parsed
        Specified by:
        getFileName in class AbstractInputParser
        Returns:
        the name of the file being parsed
      • getCurrentLine

        public String getCurrentLine()
        Provides access to the current (just parsed) line in pre-parsed format. NOTE: Because AbstractInputParser pre-fetches the next line, this method actually returns the next line, not the most recent line returned by next().
      • getCurrentLineNumber

        public int getCurrentLineNumber()
        NOTE: Because AbstractInputParser pre-fetches the next line, this method actually returns the next line, not the most recent line returned by next().