public class IO
extends Object
Reader and writer helpers used by the JSON parser internals.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static int |
copy(Reader input, Writer output)Copies all characters from a reader to a writer. |
|
public static long |
copyLarge(Reader reader, Writer writer)Copies all characters from a reader to a writer using the default buffer size. |
|
public static long |
copyLarge(Reader reader, Writer writer, char[] buffer)Copies all characters from a reader to a writer using the supplied buffer. |
|
public static CharBuf |
read(Reader input, CharBuf charBuf, int bufSize)Reads all characters from a reader into a recyclable buffer and closes the reader. |
Copies all characters from a reader to a writer.
input - reader supplying charactersoutput - writer receiving characters-1 when the count exceeds Integer.MAX_VALUECopies all characters from a reader to a writer using the default buffer size.
reader - reader supplying characterswriter - writer receiving charactersCopies all characters from a reader to a writer using the supplied buffer.
reader - reader supplying characterswriter - writer receiving charactersbuffer - temporary buffer to reuse during copyingReads all characters from a reader into a recyclable buffer and closes the reader.
input - reader supplying characterscharBuf - existing buffer to reuse, or null to allocate onebufSize - initial buffer size when a new buffer is allocated