Top Description Constructors Methods
org.snakeyaml.engine.v2.api

public Class YamlOutputStreamWriter

extends OutputStreamWriter
implements StreamDataWriter
Class Inheritance
All Implemented Interfaces
org.snakeyaml.engine.v2.api.StreamDataWriter
Imports
java.io.IOException, .OutputStream, .OutputStreamWriter, .UncheckedIOException, java.nio.charset.Charset

Provide an implementation of StreamDataWriter interface which does not throw IOException but wraps those into UncheckedIOExceptions.

Constructor Summary

AccessConstructor and Description
public
YamlOutputStreamWriter(OutputStream
- the output
out
,
Charset
- encoding to use to translate String to bytes
cs
)

Create

Method Summary

Modifier and TypeMethod and Description
public void
flush()

Overrides java.io.OutputStreamWriter.flush.

Overrides default org.snakeyaml.engine.v2.api.StreamDataWriter.flush.

Implements java.io.Flushable.flush.

Flushes this stream by writing any buffered output to the underlying stream.

public void
processIOException(IOException
- the reason
e
)

Default implementation wraps the given IOException into an UncheckedIOException.

public void
write(String str, int off, int len)

Overrides java.io.OutputStreamWriter.write.

Implements org.snakeyaml.engine.v2.api.StreamDataWriter.write.

Write part of the data

public void
Inherited from java.io.OutputStreamWriter:
appendappendclosegetEncodingwritewrite

Constructor Detail

YamlOutputStreamWriterback to summary
public YamlOutputStreamWriter(OutputStream out, Charset cs)

Create

Parameters
out:OutputStream

- the output

cs:Charset

- encoding to use to translate String to bytes

Method Detail

flushback to summary
public void flush()

Overrides java.io.OutputStreamWriter.flush.

Overrides default org.snakeyaml.engine.v2.api.StreamDataWriter.flush.

Implements java.io.Flushable.flush.

Doc from org.snakeyaml.engine.v2.api.StreamDataWriter.flush.

Flushes this stream by writing any buffered output to the underlying stream.

Annotations
@Override
processIOExceptionback to summary
public void processIOException(IOException e)

Default implementation wraps the given IOException into an UncheckedIOException.

Parameters
e:IOException

- the reason

writeback to summary
public void write(String str, int off, int len)

Overrides java.io.OutputStreamWriter.write.

Implements org.snakeyaml.engine.v2.api.StreamDataWriter.write.

Doc from org.snakeyaml.engine.v2.api.StreamDataWriter.write.

Write part of the data

Annotations
@Override
writeback to summary
public void write(String str)

Overrides java.io.Writer.write.

Implements org.snakeyaml.engine.v2.api.StreamDataWriter.write.

Doc from org.snakeyaml.engine.v2.api.StreamDataWriter.write.

write the whole data

Annotations
@Override