- java.lang.Object
-
- java.io.Writer
-
- com.google.gson.internal.Streams.AppendableWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.Appendable,java.lang.AutoCloseable
- Enclosing class:
- Streams
private static final class Streams.AppendableWriter extends java.io.WriterAdapts anAppendableso it can be passed anywhere aWriteris used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classStreams.AppendableWriter.CurrentWriteA mutable char sequence pointing at a single char[].
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Appendableappendableprivate Streams.AppendableWriter.CurrentWritecurrentWrite
-
Constructor Summary
Constructors Constructor Description AppendableWriter(java.lang.Appendable appendable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()voidwrite(char[] chars, int offset, int length)voidwrite(int i)
-
-
-
Field Detail
-
appendable
private final java.lang.Appendable appendable
-
currentWrite
private final Streams.AppendableWriter.CurrentWrite currentWrite
-
-
Method Detail
-
write
public void write(char[] chars, int offset, int length) throws java.io.IOException- Specified by:
writein classjava.io.Writer- Throws:
java.io.IOException
-
write
public void write(int i) throws java.io.IOException- Overrides:
writein classjava.io.Writer- Throws:
java.io.IOException
-
flush
public void flush()
- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Writer
-
-