Update JsonReader & JsonWriter javadoc to use BufferedSource & BufferedSink
This commit is contained in:
parent
41ec6118fe
commit
0ce7310caa
2 changed files with 2 additions and 2 deletions
|
@ -83,7 +83,7 @@ import okio.ByteString;
|
|||
* ]}</pre>
|
||||
* This code implements the parser for the above structure: <pre> {@code
|
||||
*
|
||||
* public List<Message> readJsonStream(Source source) throws IOException {
|
||||
* public List<Message> readJsonStream(BufferedSource source) throws IOException {
|
||||
* JsonReader reader = new JsonReader(source);
|
||||
* try {
|
||||
* return readMessagesArray(reader);
|
||||
|
|
|
@ -75,7 +75,7 @@ import static com.squareup.moshi.JsonScope.NONEMPTY_OBJECT;
|
|||
* }
|
||||
* ]}</pre>
|
||||
* This code encodes the above structure: <pre> {@code
|
||||
* public void writeJsonStream(Sink sink, List<Message> messages) throws IOException {
|
||||
* public void writeJsonStream(BufferedSink sink, List<Message> messages) throws IOException {
|
||||
* JsonWriter writer = new JsonWriter(sink);
|
||||
* writer.setIndentSpaces(4);
|
||||
* writeMessagesArray(writer, messages);
|
||||
|
|
Loading…
Reference in a new issue