Package 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 java.lang.ObjectA line reader based on blocking stream IO.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SMFTLineReaderTypecreate(java.net.URI in_uri, java.io.InputStream in_stream)Construct a new line reader.java.util.Optional<java.util.List<java.lang.String>>line()Get the next line.protected java.lang.StringlineNextRaw()protected org.slf4j.Loggerlog()com.io7m.jlexing.core.LexicalPosition<java.net.URI>position()
-
-
-
Method Detail
-
create
public static SMFTLineReaderType create(java.net.URI in_uri, java.io.InputStream in_stream)
Construct a new line reader.- Parameters:
in_uri- The file URI, for diagnostic messagesin_stream- The input stream- Returns:
- A line reader
-
log
protected org.slf4j.Logger log()
-
lineNextRaw
protected java.lang.String lineNextRaw() throws java.io.IOException- Throws:
java.io.IOException
-
position
public final com.io7m.jlexing.core.LexicalPosition<java.net.URI> position()
- Specified by:
positionin interfaceSMFTLineReaderType- Returns:
- The current position
-
line
public final java.util.Optional<java.util.List<java.lang.String>> line() throws java.io.IOExceptionDescription copied from interface:SMFTLineReaderTypeGet the next line.- Specified by:
linein interfaceSMFTLineReaderType- Returns:
- A lexed line, or nothing on EOF
- Throws:
java.io.IOException- On I/O errors
-
-