Package org.snakeyaml.engine.v2.api
Class YamlOutputStreamWriter
java.lang.Object
java.io.Writer
java.io.OutputStreamWriter
org.snakeyaml.engine.v2.api.YamlOutputStreamWriter
- All Implemented Interfaces:
Closeable
,Flushable
,Appendable
,AutoCloseable
,StreamDataWriter
Provide an example of implementation of StreamDataWriter interface which does not throw
IOException
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
flush()
Flushes this stream by writing any buffered output to the underlying stream.abstract void
to be implementedvoid
write the whole datavoid
Write part of the dataMethods inherited from class java.io.OutputStreamWriter
append, append, close, getEncoding, write, write
Methods inherited from class java.io.Writer
append, nullWriter, write
-
Constructor Details
-
YamlOutputStreamWriter
Create- Parameters:
out
- - the outputcs
- - encoding to use to translate String to bytes
-
-
Method Details
-
processIOException
to be implemented- Parameters:
e
- - the reason
-
flush
public void flush()Description copied from interface:StreamDataWriter
Flushes this stream by writing any buffered output to the underlying stream.- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in interfaceStreamDataWriter
- Overrides:
flush
in classOutputStreamWriter
-
write
Description copied from interface:StreamDataWriter
Write part of the data- Specified by:
write
in interfaceStreamDataWriter
- Overrides:
write
in classOutputStreamWriter
- Parameters:
str
- - the data to write (the source)off
- - offset to start fromlen
- - number of chars to write
-
write
Description copied from interface:StreamDataWriter
write the whole data- Specified by:
write
in interfaceStreamDataWriter
- Overrides:
write
in classWriter
- Parameters:
str
- - data to write
-