- java.lang.Object
-
- com.github.akurilov.commons.io.TextStreamOutput
-
- All Implemented Interfaces:
Output<java.lang.String>,java.lang.AutoCloseable,java.util.function.Consumer<java.lang.String>
- Direct Known Subclasses:
TextFileOutput
public abstract class TextStreamOutput extends java.lang.Object implements Output<java.lang.String>
The input implementation designed to write the text lines usingBufferedWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected java.io.BufferedWriterwriter
-
Constructor Summary
Constructors Constructor Description TextStreamOutput(java.io.OutputStream out)TextStreamOutput(java.io.OutputStream out, int buffSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanput(java.lang.String line)Write the data itemintput(java.util.List<java.lang.String> lines)Uses the thread local string builder to concatenate the lines into the single text block for better performanceintput(java.util.List<java.lang.String> lines, int from, int to)Uses the thread local string builder to concatenate the lines into the single text block for better performance
-
-
-
Method Detail
-
put
public boolean put(java.lang.String line)
Description copied from interface:OutputWrite the data item
-
put
public int put(java.util.List<java.lang.String> lines, int from, int to)Uses the thread local string builder to concatenate the lines into the single text block for better performance
-
put
public int put(java.util.List<java.lang.String> lines)
Uses the thread local string builder to concatenate the lines into the single text block for better performance
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-