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 void
close()
void
flush()
void
write(int buffer)
void
write(String text)
Write a sequence of characters.void
writeln(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:
write
in 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
-