com.io7m.smfj.format.text

## Class SMFTLineReaderStreamIO

- java.lang.Object
- - com.io7m.smfj.format.text.SMFTLineReaderStreamIO

- All Implemented Interfaces:
    SMFTLineReaderType

      public final class SMFTLineReaderStreamIO
      extends Object

  A line reader based on blocking stream IO.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFTLineReaderType` | `create(URI in_uri, InputStream in_stream)` Construct a new line reader.
    `Optional<javaslang.collection.List<String>>` | `line()` Get the next line.
    `protected String` | `lineNextRaw()`
    `protected org.slf4j.Logger` | `log()`
    `com.io7m.jlexing.core.LexicalPosition<URI>` | `position()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### create

          public static SMFTLineReaderType create(URI in_uri,
                                                  InputStream in_stream)

      Construct a new line reader.
      Parameters:
        `in_uri` - The file URI, for diagnostic messages
        `in_stream` - The input stream
      Returns:
        A line reader

    - #### log

          protected org.slf4j.Logger log()

    - #### lineNextRaw

          protected String lineNextRaw()
                                throws IOException

      Throws:
        `IOException`

    - #### position

          public final com.io7m.jlexing.core.LexicalPosition<URI> position()

      Specified by:
        `position` in interface `SMFTLineReaderType`
      Returns:
        The current position

    - #### line

          public final Optional<javaslang.collection.List<String>> line()
                                                                 throws IOException

      Description copied from interface: `SMFTLineReaderType`
      Get the next line.
      Specified by:
        `line` in interface `SMFTLineReaderType`
      Returns:
        A lexed line, or nothing on EOF
      Throws:
        `IOException` - On I/O errors

Copyright © 2017 <code@io7m.com> http://io7m.com