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
public abstract class YamlOutputStreamWriter extends OutputStreamWriter implements StreamDataWriter
Provide an example of implementation of StreamDataWriter interface which does not throwIOException
-
-
Constructor Summary
Constructors Constructor Description YamlOutputStreamWriter(OutputStream out, Charset cs)Create
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidflush()Flushes this stream by writing any buffered output to the underlying stream.abstract voidprocessIOException(IOException e)to be implementedvoidwrite(String str)write the whole datavoidwrite(String str, int off, int len)Write part of the data-
Methods inherited from class java.io.OutputStreamWriter
append, append, close, getEncoding, write, write
-
Methods inherited from class java.io.Writer
append, nullWriter, write
-
-
-
-
Constructor Detail
-
YamlOutputStreamWriter
public YamlOutputStreamWriter(OutputStream out, Charset cs)
Create- Parameters:
out- - the outputcs- - encoding to use to translate String to bytes
-
-
Method Detail
-
processIOException
public abstract void processIOException(IOException e)
to be implemented- Parameters:
e- - the reason
-
flush
public void flush()
Description copied from interface:StreamDataWriterFlushes this stream by writing any buffered output to the underlying stream.- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceStreamDataWriter- Overrides:
flushin classOutputStreamWriter
-
write
public void write(String str, int off, int len)
Description copied from interface:StreamDataWriterWrite part of the data- Specified by:
writein interfaceStreamDataWriter- Overrides:
writein classOutputStreamWriter- Parameters:
str- - the data to write (the source)off- - offset to start fromlen- - number of chars to write
-
write
public void write(String str)
Description copied from interface:StreamDataWriterwrite the whole data- Specified by:
writein interfaceStreamDataWriter- Overrides:
writein classWriter- Parameters:
str- - data to write
-
-