Class SeparatedValuesReader

java.lang.Object
org.forgerock.openig.text.SeparatedValuesReader

public class SeparatedValuesReader extends Object
Reads records with delimiter-separated values from a character stream.
  • Constructor Details

    • SeparatedValuesReader

      public SeparatedValuesReader(Reader input, Separator separator)
      Constructs a new separated values reader, to read a character stream from the specified reader and use the specified separator specification.
      Parameters:
      input - the character stream to read from.
      separator - the separator specification to parse the file with.
  • Method Details

    • next

      public List<String> next() throws IOException
      Reads the next record from the character input stream.
      Returns:
      a list of fields contained in the next record, or null if the end of stream has been reached.
      Throws:
      IOException - if an I/O exception occurs.
    • close

      public void close()
      Closes the reader and releases any system resources associated with it. Once the reader has been closed, further next() invocations will throw an IOException. Closing a previously closed reader has no effect.