Class WriterOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- org.arakhne.afc.inputoutput.stream.WriterOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class WriterOutputStream extends OutputStream
An output stream that is writing inside a Writer.- Version:
- 17.0 2020-01-04 14:41:40
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- inputoutput
-
-
Constructor Summary
Constructors Constructor Description WriterOutputStream(Writer writer)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(int buffer)voidwrite(String text)Write a sequence of characters.voidwriteln(String text)Write a sequence of characters followed by a carriage return.-
Methods inherited from class java.io.OutputStream
nullOutputStream, write, write
-
-
-
-
Constructor Detail
-
WriterOutputStream
public WriterOutputStream(Writer writer)
Construct.- Parameters:
writer- writer.
-
-
Method Detail
-
write
public void write(int buffer) throws IOException- Specified by:
writein classOutputStream- Throws:
IOException
-
write
public void write(String text) throws IOException
Write a sequence of characters.- Parameters:
text- text.- Throws:
IOException- on error.
-
writeln
public void writeln(String text) throws IOException
Write a sequence of characters followed by a carriage return.- Parameters:
text- text.- Throws:
IOException- on error.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
-