Package com.google.common.io
Class ByteSink.AsCharSink
- java.lang.Object
-
- com.google.common.io.CharSink
-
- com.google.common.io.ByteSink.AsCharSink
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.charset.Charset
charset
-
Constructor Summary
Constructors Modifier Constructor Description private
AsCharSink(java.nio.charset.Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.Writer
openStream()
Opens a newWriter
for writing to this sink.java.lang.String
toString()
-
Methods inherited from class com.google.common.io.CharSink
openBufferedStream, write, writeFrom, writeLines, writeLines, writeLines, writeLines
-
-
-
-
Method Detail
-
openStream
public java.io.Writer openStream() throws java.io.IOException
Description copied from class:CharSink
Opens a newWriter
for writing to this sink. This method returns a new, independent writer each time it is called.The caller is responsible for ensuring that the returned writer is closed.
- Specified by:
openStream
in classCharSink
- Throws:
java.io.IOException
- if an I/O error occurs while opening the writer
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-