- java.lang.Object
-
- com.github.akurilov.commons.io.TextStreamInput
-
- All Implemented Interfaces:
Input<java.lang.String>,java.lang.AutoCloseable,java.util.function.Supplier<java.lang.String>
- Direct Known Subclasses:
TextFileInput
public class TextStreamInput extends java.lang.Object implements Input<java.lang.String>
The input implementation designed to read the text lines from the given input stream usingBufferedReader
-
-
Constructor Summary
Constructors Constructor Description TextStreamInput(java.io.InputStream input)TextStreamInput(java.io.InputStream input, int buffSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.Stringget()Get next itemintget(java.util.List<java.lang.String> buffer, int limit)Get some linesvoidreset()Most probably will cause an IOExceptionlongskip(long count)Skips characters instead of lines
-
-
-
Method Detail
-
get
public java.lang.String get()
Description copied from interface:InputGet next item
-
get
public int get(java.util.List<java.lang.String> buffer, int limit)Get some lines
-
skip
public long skip(long count)
Skips characters instead of lines
-
reset
public void reset()
Most probably will cause an IOException
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-