| Modifier and Type | Class and Description |
|---|---|
| private static class | Streams.
Adapts an |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static JsonElement | |
| public static void | |
| public static Writer |
| Streams | back to summary |
|---|---|
| private Streams() | |
| parse | back to summary |
|---|---|
| public static JsonElement parse(JsonReader reader) throws JsonParseException Takes a reader in any state and returns the next value as a JsonElement. | |
| write | back to summary |
|---|---|
| public static void write(JsonElement element, JsonWriter writer) throws IOException Writes the JSON element to the writer, recursively. | |
| writerForAppendable | back to summary |
|---|---|
| public static Writer writerForAppendable(Appendable appendable) | |
Appendable so it can be passed anywhere a Writer is used.
| Modifier and Type | Class and Description |
|---|---|
| private static class | Streams.
A mutable char sequence pointing at a single char[]. |
| Modifier and Type | Field and Description |
|---|---|
| private final Appendable | |
| private final Streams. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Writer | append(CharSequence csq)
Overrides java. Implements java. Appends the specified character sequence to this writer. |
| public Writer | append(CharSequence csq, int start, int end)
Overrides java. Implements java. Appends a subsequence of the specified character sequence to this writer. |
| public void | close()
Implements abstract java. Implements java. Closes the stream, flushing it first. |
| public void | flush()
Implements abstract java. Implements java. Flushes the stream. |
| public void | write(char[] chars, int offset, int length)
Implements abstract java. Writes a portion of an array of characters. |
| public void | |
| public void |
| appendable | back to summary |
|---|---|
| private final Appendable appendable | |
| currentWrite | back to summary |
|---|---|
| private final Streams. | |
| AppendableWriter | back to summary |
|---|---|
| pack-priv AppendableWriter(Appendable appendable) | |
| append | back to summary |
|---|---|
| public Writer append(CharSequence csq) throws IOException Overrides java. Implements java. Doc from java. Appends the specified character sequence to this writer. An invocation of this method of the form out.write(csq.toString()) Depending on the specification of
| |
| append | back to summary |
|---|---|
| public Writer append(CharSequence csq, int start, int end) throws IOException Overrides java. Implements java. Doc from java. Appends a subsequence of the specified character sequence to this writer. An invocation of this method of the form
out.write(csq.subSequence(start, end).toString())
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements abstract java. Implements java. Doc from java. Closes the stream, flushing it first. Once the stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously closed stream has no effect.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements abstract java. Implements java. Doc from java. Flushes the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams. If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| write | back to summary |
|---|---|
| public void write(char[] chars, int offset, int length) throws IOException Implements abstract java. Doc from java. Writes a portion of an array of characters.
| |
| write | back to summary |
|---|---|
| public void write(int i) throws IOException Overrides java. Doc from java. Writes a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored. Subclasses that intend to support efficient single-character output should override this method.
| |
| write | back to summary |
|---|---|
| public void write(String str, int off, int len) throws IOException Overrides java. Doc from java. Writes a portion of a string.
| |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private char[] |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public char | charAt(int i)
Implements java. Returns the |
| public int | |
| pack-priv void | |
| public CharSequence | subSequence(int start, int end)
Implements java. Returns a |
| public String | toString()
Overrides java. Implements java. Returns a string containing the characters in this sequence in the same order as this sequence. |
| cachedString | back to summary |
|---|---|
| private String cachedString | |
| chars | back to summary |
|---|---|
| private char[] chars | |
| CurrentWrite | back to summary |
|---|---|
| private CurrentWrite() | |
| charAt | back to summary |
|---|---|
| public char charAt(int i) Implements java. Doc from java. Returns the If the
| |
| length | back to summary |
|---|---|
| public int length() Implements java. Doc from java. Returns the length of this character sequence. The length is the number
of 16-bit
| |
| setChars | back to summary |
|---|---|
| pack-priv void setChars(char[] chars) | |
| subSequence | back to summary |
|---|---|
| public CharSequence subSequence(int start, int end) Implements java. Doc from java. Returns a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Implements java. Doc from java. Returns a string containing the characters in this sequence in the same order as this sequence. The length of the string will be the length of this sequence.
| |