A Few 'Ok' Libraries (Droidcon MTL 2015)

A Few 'Ok' Libraries (Droidcon MTL 2015)

This talk will be an in-depth look at Okio—a tiny library for interacting with bytes—and a few of the libraries written on top of it: OkHttp, Retrofit, and a newcomer named Moshi.

Okio evolved naturally inside of OkHttp before being split out into its own library. It wraps common patterns behind a friendly API for reading, writing, and processing data. We'll start with some fundamentals of the library and how it can enable you to work very close to raw data with ease.

After an introduction to Okio, we will look at three libraries written with it: OkHttp, a modern HTTP client; Retrofit, a high-level HTTP wrapper; and Moshi, a brand new library for serialization.

Not only are these libraries powerful on their own, but when combined their efficiency and performance dramatically increase. We'll conclude with demonstration of how to use them in your applications to great effect.

Video: https://youtu.be/WvyScM_S88c

E68309f117985270285ade8082f4877d?s=128

Jake Wharton

April 09, 2015
Tweet

Transcript

  1. 2.
  2. 3.
  3. 4.
  4. 6.
  5. 7.
  6. 9.

    HTTP GET  /a-­‐few-­‐ok-­‐libraries.html  HTTP/1.1   Host:  droidcon.ca HTTP/1.1  200  OK

      Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! ...
  7. 10.

    HTTP HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! ...
  8. 11.

    HTTP HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! ...                ·∙      ·∙    \r\n            ·∙        ·∙  ·∙      ·∙        ·∙                ·∙      \r\n                ·∙                                  ·∙              \r\n                            ·∙                                                  ·∙                          \r\n                                ·∙        \r\n   \r\n
  9. 16.

    HTTP                  

                       Date:·∙T   hu,·∙9·∙Apr·∙2015·∙15:14:34·∙GMT\r\nServer:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1      200      OK
  10. 17.

    HTTP                  

                       Date:·∙T   hu,·∙9·∙Apr·∙2015·∙15:14:34·∙GMT\r\nServer:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1      200      OK
  11. 18.

    HTTP                  

                       Date:·∙T   hu,·∙9·∙Apr·∙2015·∙15:14:34·∙GMT\r\nServer:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1      200      OK
  12. 19.

    HTTP !                

                                                 Server:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1      200      OK Date      Thu,  9  Apr  2015  15:14:34  GMT
  13. 20.
  14. 25.

    java.io.* abstract class InputStream {
 void close();
 long skip(long byteCount);


    }X 
 while (byteCount > 0) {
 byteCount -= is.skip(byteCount);
 }X

  15. 26.

    java.io.* abstract class InputStream {
 void close();
 long skip(long byteCount);


    }X public static void reallySkip(InputStream is, long byteCount) {
 while (byteCount > 0) {
 byteCount -= is.skip(byteCount);
 }X
 }
  16. 27.

    java.io.* abstract class InputStream {
 void close();
 int read(byte[] buffer);


    int read(byte[] buffer, int offset, int count);
 long skip(long byteCount);
 }X
  17. 28.

    java.io.* abstract class InputStream {
 void close(); int read();
 int

    read(byte[] buffer);
 int read(byte[] buffer, int offset, int count);
 long skip(long byteCount);
 }X
  18. 29.

    java.io.* abstract class InputStream {
 int available();
 void close();
 void

    mark(int readLimit);
 boolean markSupported(); int read();
 int read(byte[] buffer);
 int read(byte[] buffer, int offset, int count);
 synchronized void reset();
 long skip(long byteCount);
 }X
  19. 31.

    HTTP !                

                                                 Server:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1      200      OK Date      Thu,  9  Apr  2015  15:14:34  GMT
  20. 32.

    HTTP !                

                                                 Server:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1·∙200·∙OKrnDate:·∙Thu,·∙9·∙Apr·∙2015·∙15:14:34·∙GMTrn
  21. 33.

    HTTP !                

                                                 Server:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... HTTP/1.1·∙200·∙OKrnDate:·∙Thu,·∙9·∙Apr·∙2015·∙15:14:34·∙GMTrn
  22. 34.

    HTTP !                

                                                 Server:·∙JakeWharto   n/2.3.7·∙(Huma   n)\r\nContent-­‐Type:·∙application/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...
  23. 37.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... Server:·∙JakeWharton/2.3.7·∙(Human)rnContent-­‐Type:·∙app
  24. 38.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... Server:·∙JakeWharton/2.3.7·∙(Human)rnContent-­‐Type:·∙app
  25. 39.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app Server      JakeWharton/2.3.7  (Human)
  26. 40.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app
  27. 41.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app                                                                      Content-­‐Type:·∙app
  28. 42.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app Content-­‐Type:·∙app
  29. 43.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... Content-­‐Type:·∙app
  30. 44.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... Content-­‐Type:·∙app
  31. 45.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...
  32. 46.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app
  33. 47.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app
  34. 48.

    HTTP ! ! !            

                                     lication/presentation;·∙charset   =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n...                                                                      Content-­‐Type:·∙app
  35. 50.

    HTTP ! ! ! !          8\r\nContent-­‐Length:·∙3000\r

      \n\r\n... lication/presentation;·∙charset=UTF-­‐Content-­‐Type:·∙app
  36. 52.

    java.io.* • API is conflated with multiple concepts and inconsistent

    behavior ! • Burden of figuring out storage is on the consumer
  37. 53.

    java.io.* class BufferedInputStream extends InputStream {
 BufferedInputStream(InputStream is) {
 //

    ...
 }
 
 BufferedInputStream(InputStream is, int size) {
 // ...
 }
 }
  38. 60.

    java.io.* ! ! ! ! =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... Server:·∙JakeWharton/2.3.7·∙(Human)rnContent-­‐Type:·∙application/presentation;·∙charset  

                                                                       Content-­‐Type:·∙app
  39. 61.

    java.io.* ! ! ! ! =UTF-­‐8\r\nContent-­‐Length:·∙3000\r   \n\r\n... Server:·∙JakeWharton/2.3.7·∙(Human)rnContent-­‐Type:·∙application/presentation;·∙charset  

                                                                       Content-­‐Type:·∙app                                                                                                        lication/presentation;·∙charset
  40. 64.

    java.io.* • API is conflated with multiple concepts and inconsistent

    behavior • Burden of figuring out storage is on the consumer
  41. 65.

    java.io.* • API is conflated with multiple concepts and inconsistent

    behavior • Burden of figuring out storage is on the consumer ! ! • Decorators add performance, functionality
  42. 66.

    java.io.* class DataInputStream extends InputStream {
 DataInputStream(InputStream in) {}
 


    void readFully(byte[] b) {}
 void readFully(byte b[], int off, int len) {}
 boolean readBoolean() {}
 byte readByte() {}
 int readUnsignedByte() {}
 short readShort() {}
 int readUnsignedShort() {}
 char readChar() {}
 int readInt() {}
 long readLong() {}
 float readFloat() {}
 double readDouble() {}
 String readLine() {}
 String readUTF() {}
 }
  43. 67.

    java.io.* class DataInputStream extends InputStream {
 DataInputStream(InputStream in) {}
 


    void readFully(byte[] b) {}
 void readFully(byte b[], int off, int len) {}
 boolean readBoolean() {}
 byte readByte() {}
 int readUnsignedByte() {}
 short readShort() {}
 int readUnsignedShort() {}
 char readChar() {}
 int readInt() {}
 long readLong() {}
 float readFloat() {}
 double readDouble() {}
 String readLine() {}
 String readUTF() {}
 } class InputStreamReader extends Reader {
 InputStreamReader(InputStream is) {}
 InputStreamReader(InputStream is, String charsetName) {}
 InputStreamReader(InputStream is, CharsetDecoder dec) {}
 InputStreamReader(InputStream is, Charset charset) {}
 
 int read() {}
 int read(char[] buffer) {}
 int read(char[] buffer, int offset, int count) {}
 int read(CharBuffer buffer) {}
 }
  44. 68.

    java.io.* • API is conflated with multiple concepts and inconsistent

    behavior • Burden of figuring out storage is on the consumer • Decorators add performance, functionality
  45. 69.

    java.io.* • API is conflated with multiple concepts and inconsistent

    behavior • Burden of figuring out storage is on the consumer • Decorators add performance, functionality ! ! ! • High-level abstractions exist, but do not compose
  46. 70.
  47. 80.
  48. 81.
  49. 83.

    Okio • Complements java.io.* and java.nio.*   • Source and

    Sink move data • Complements java.io.* and java.nio  * • Source and Sink move data • Buffer and ByteString hold data
  50. 86.

    Okio Buffer buffer = new Buffer(); Segment Pool byte[] !

    pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 Buffer
  51. 87.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); Segment Pool

    byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 Buffer
  52. 88.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); byte[]

    ! pos=0 limit=0 Segment Pool byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  53. 89.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); byte[]

    ! pos=0 limit=15 Segment Pool byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  54. 90.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); byte[] ! pos=0 limit=15 Segment Pool byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  55. 91.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); byte[] ! pos=0 limit=30 Segment Pool byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  56. 92.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); buffer.writeUtf8("Hello, Droidcon"); byte[] ! pos=0 limit=30 Segment Pool byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  57. 93.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); buffer.writeUtf8("Hello, Droidcon"); byte[] ! pos=0 limit=30 byte[] ! pos=0 limit=0 Segment Pool byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  58. 94.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); buffer.writeUtf8("Hello, Droidcon"); byte[] ! pos=0 limit=30 Segment Pool byte[] ! pos=0 limit=15 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  59. 95.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); buffer.writeUtf8("Hello, Droidcon"); byte[] ! pos=0 limit=30 Segment Pool byte[] ! pos=0 limit=15 byte[] ! pos=0 limit=0 byte[] ! pos=0 limit=0
  60. 96.

    Buffer Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello,

    Droidcon"); buffer.writeUtf8("Hello, Droidcon"); byte[] ! pos=0 limit=30 byte[] ! pos=0 limit=15 Segment Pool
  61. 97.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); Buffer byte[] ! pos=0 limit=30 byte[] ! pos=0 limit=15 Segment Pool
  62. 98.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" Buffer byte[] ! pos=5 limit=30 byte[] ! pos=0 limit=15 Segment Pool
  63. 99.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); Buffer byte[] ! pos=5 limit=30 byte[] ! pos=0 limit=15 Segment Pool
  64. 100.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); // ", DroidconHello, Droidcon" Buffer byte[] ! pos=30 limit=30 byte[] ! pos=0 limit=15 Segment Pool
  65. 101.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); // ", DroidconHello, Droidcon" Buffer byte[] ! pos=0 limit=15 Segment Pool
  66. 102.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); // ", DroidconHello, Droidcon" ! Buffer otherBuffer = new Buffer(); Buffer byte[] ! pos=0 limit=15
  67. 103.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); // ", DroidconHello, Droidcon" ! Buffer otherBuffer = new Buffer(); Buffer byte[] ! pos=0 limit=15 Buffer
  68. 104.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); // ", DroidconHello, Droidcon" ! Buffer otherBuffer = new Buffer(); otherBuffer.writeAll(buffer); Buffer byte[] ! pos=0 limit=15 Buffer
  69. 105.

    Okio Buffer buffer = new Buffer(); buffer.writeUtf8("Hello, Droidcon"); buffer.writeUtf8("Hello, Droidcon");

    buffer.writeUtf8("Hello, Droidcon”); ! buffer.readUtf8(5); // "Hello" buffer.readUtf8(25); // ", DroidconHello, Droidcon" ! Buffer otherBuffer = new Buffer(); otherBuffer.writeAll(buffer); Buffer byte[] ! pos=0 limit=15 Buffer
  70. 106.

    Okio • Complements java.io.* and java.nio.*   • Source and

    Sink move data • Buffer and ByteString hold data
  71. 107.

    Okio • Complements java.io.* and java.nio.*   • Source and

    Sink move data • Buffer and ByteString hold data • Complements java.io.* and java.nio.* • Source and Sink move data • Buffer and ByteString hold data • BufferedSource and BufferedSink move data efficiently
  72. 110.

    Okio interface BufferedSink extends Sink {
 BufferedSink write(ByteString byteString);
 BufferedSink

    write(byte[] source);
 BufferedSink write(byte[] source, int offset, int byteCount);
 long writeAll(Source source);
 BufferedSink write(Source source, long byteCount);
 BufferedSink writeUtf8(String string);
 BufferedSink writeString(String string, Charset charset);
 BufferedSink writeByte(int b);
 BufferedSink writeShort(int s);
 BufferedSink writeShortLe(int s);
 BufferedSink writeInt(int i);
 BufferedSink writeIntLe(int i);
 BufferedSink writeLong(long v);
 BufferedSink writeLongLe(long v);
 BufferedSink writeDecimalLong(long v);
 BufferedSink writeHexadecimalUnsignedLong(long v);
 }X interface BufferedSource extends Source {
 }X
  73. 111.

    Okio interface BufferedSource extends Source {
 byte readByte();
 short readShort();


    short readShortLe();
 int readInt();
 int readIntLe();
 long readLong();
 long readLongLe();
 long readDecimalLong();
 long readHexadecimalUnsignedLong();
 ByteString readByteString();
 ByteString readByteString(long byteCount);
 byte[] readByteArray();
 byte[] readByteArray(long byteCount);
 int read(byte[] sink);
 void readFully(byte[] sink);
 int read(byte[] sink, int offset, int byteCount);
 void readFully(Buffer sink, long byteCount);
 long readAll(Sink sink);
 String readUtf8();
 String readUtf8(long byteCount);
 String readUtf8Line();
 String readUtf8LineStrict();
 String readString(Charset charset);
 String readString(long byteCount, Charset charset); 
 long indexOf(byte b);
 long indexOf(byte b, long fromIndex);
 long indexOfElement(ByteString targetBytes);
 long indexOfElement(ByteString targetBytes, long fromIndex);
 }X interface BufferedSink extends Sink {
 BufferedSink write(ByteString byteString);
 BufferedSink write(byte[] source);
 BufferedSink write(byte[] source, int offset, int byteCount);
 long writeAll(Source source);
 BufferedSink write(Source source, long byteCount);
 BufferedSink writeUtf8(String string);
 BufferedSink writeString(String string, Charset charset);
 BufferedSink writeByte(int b);
 BufferedSink writeShort(int s);
 BufferedSink writeShortLe(int s);
 BufferedSink writeInt(int i);
 BufferedSink writeIntLe(int i);
 BufferedSink writeLong(long v);
 BufferedSink writeLongLe(long v);
 BufferedSink writeDecimalLong(long v);
 BufferedSink writeHexadecimalUnsignedLong(long v);
 }X
  74. 112.

    Okio interface BufferedSource extends Source {
 byte readByte();
 short readShort();


    short readShortLe();
 int readInt();
 int readIntLe();
 long readLong();
 long readLongLe();
 long readDecimalLong();
 long readHexadecimalUnsignedLong();
 ByteString readByteString();
 ByteString readByteString(long byteCount);
 byte[] readByteArray();
 byte[] readByteArray(long byteCount);
 int read(byte[] sink);
 void readFully(byte[] sink);
 int read(byte[] sink, int offset, int byteCount);
 void readFully(Buffer sink, long byteCount);
 long readAll(Sink sink);
 String readUtf8();
 String readUtf8(long byteCount);
 String readUtf8Line();
 String readUtf8LineStrict();
 String readString(Charset charset);
 String readString(long byteCount, Charset charset); 
 long indexOf(byte b);
 long indexOf(byte b, long fromIndex);
 long indexOfElement(ByteString targetBytes);
 long indexOfElement(ByteString targetBytes, long fromIndex); ! boolean exhausted();
 void require(long byteCount);
 boolean request(long byteCount);
 void skip(long byteCount); ! Buffer buffer();
 InputStream inputStream();
 }X interface BufferedSink extends Sink {
 BufferedSink write(ByteString byteString);
 BufferedSink write(byte[] source);
 BufferedSink write(byte[] source, int offset, int byteCount);
 long writeAll(Source source);
 BufferedSink write(Source source, long byteCount);
 BufferedSink writeUtf8(String string);
 BufferedSink writeString(String string, Charset charset);
 BufferedSink writeByte(int b);
 BufferedSink writeShort(int s);
 BufferedSink writeShortLe(int s);
 BufferedSink writeInt(int i);
 BufferedSink writeIntLe(int i);
 BufferedSink writeLong(long v);
 BufferedSink writeLongLe(long v);
 BufferedSink writeDecimalLong(long v);
 BufferedSink writeHexadecimalUnsignedLong(long v);
 BufferedSink emitCompleteSegments(); BufferedSink emit(); ! Buffer buffer();
 OutputStream outputStream();
 }X
  75. 115.

    Okio ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• Socket
  76. 116.

    Okio ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket
  77. 117.

    Okio BufferedSource Socket ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• source.readInt();
  78. 118.

    Okio BufferedSource Socket ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• source.readInt();
  79. 119.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt();
  80. 120.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket        •••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
  81. 121.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket        •••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt();
  82. 122.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket                •••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
  83. 123.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket                •••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4);
  84. 124.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket                        •••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
  85. 125.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket                        •••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong();
  86. 126.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket                                    ••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
  87. 127.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict();          ••••••••••
  88. 128.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket ! ! ! •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
  89. 129.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket ! ! ! •••••••••••••••   •••••••••••••••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict();
  90. 130.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket ! ! ! !                          ••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); ••••••••••••••••••••••••••••
  91. 131.

    Okio ! ! ! ! ! ! ••••••••••••••• ••••••••••••••• •••••••••••••••

    ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• ••••••••••••••• BufferedSource Socket ! ! ! !                          ••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40);
  92. 132.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket ! ! ! !                          ••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40);
  93. 133.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket ! ! ! !                          ••   ••••••••••••••• source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••
  94. 134.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• !              ••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••
  95. 135.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• !              ••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••
  96. 136.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); !              ••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••
  97. 137.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• ! ! ! ! •••••••••••••••   •••••••••••••••
  98. 138.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); ! ! ! ! •••••••••••••••   •••••••••••••••
  99. 139.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• ! ! ! !        •••••••••••   •••••••••••••••
  100. 140.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); ! ! ! !        •••••••••••   •••••••••••••••
  101. 141.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• ! ! ! !                •••••••   •••••••••••••••
  102. 142.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); ! ! ! !                •••••••   •••••••••••••••
  103. 143.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); •••••••• ! ! ! !                                  ••••••••••••••
  104. 144.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); •••••••• source.readLong(); ! ! ! !                                  ••••••••••••••
  105. 145.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); •••••••• source.readLong(); •••••••• ! ! ! !                                                  ••••••
  106. 146.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); •••••••• source.readLong(); •••••••• source.readUtf8(6); ! ! ! !                                                  ••••••
  107. 147.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); •••••••• source.readLong(); •••••••• source.readUtf8(6); ••••••
  108. 148.

    Okio ! ! ! ! ! ! ! ! !

    ! ! ! •••••••••••••••   •••••••••••••••   •••••••••••••••   •••••••••••••••   ••••••••••••••• BufferedSource Socket source.readInt(); ••••
 source.readInt(); ••••
 source.readUtf8(4); ••••
 source.readLong(); ••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••
 source.readUtf8LineStrict(); •••••••••••••••••••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readUtf8(40); •••••••••••••••••••••••••••• ••••••••••• source.readInt(); •••• source.readInt(); •••• source.readLong(); •••••••• source.readLong(); •••••••• source.readUtf8(6); ••••••
  109. 150.

    Okio class Okio {
 static BufferedSource buffer(Source source) {}
 static

    BufferedSink buffer(Sink sink) {}
 
 static Source source(InputStream in) {}
 static Sink sink(OutputStream out) {}
 }X
  110. 151.

    Okio class Okio {
 static BufferedSource buffer(Source source) {}
 static

    BufferedSink buffer(Sink sink) {}
 
 static Source source(InputStream in) {}
 static Sink sink(OutputStream out) {}
 
 static Source source(Socket socket) {}
 static Sink sink(Socket socket) {}
 }X
  111. 152.

    Okio class Okio {
 static BufferedSource buffer(Source source) {}
 static

    BufferedSink buffer(Sink sink) {}
 
 static Source source(InputStream in) {}
 static Sink sink(OutputStream out) {}
 
 static Source source(Socket socket) {}
 static Sink sink(Socket socket) {}
 
 static Source source(File file) {}
 static Sink sink(File file) {}
 static Sink appendingSink(File file) {}
 }X
  112. 153.

    Okio class Okio {
 static BufferedSource buffer(Source source) {}
 static

    BufferedSink buffer(Sink sink) {}
 
 static Source source(InputStream in) {}
 static Sink sink(OutputStream out) {}
 
 static Source source(Socket socket) {}
 static Sink sink(Socket socket) {}
 
 static Source source(File file) {}
 static Sink sink(File file) {}
 static Sink appendingSink(File file) {}
 
 static Source source(Path path, OpenOption... options) {}
 static Sink sink(Path path, OpenOption... options) {}
 }X
  113. 155.

    Okio ! ! ! ! class InflaterSource {
 InflaterSource(Source source,

    Inflater inflater) {}
 } class DeflaterSink {
 DeflaterSink(Sink sink, Deflater deflater) {}
 }
  114. 156.

    Okio ! ! ! ! ! ! ! ! class

    GzipSink {
 GzipSink(Sink sink) {}
 } ! ! ! ! class InflaterSource {
 InflaterSource(Source source, Inflater inflater) {}
 } class DeflaterSink {
 DeflaterSink(Sink sink, Deflater deflater) {}
 }
  115. 157.

    Okio ! ! ! ! ! ! ! ! class

    GzipSink {
 GzipSink(Sink sink) {}
 } 
 
 
 
 
 
 
 
 
 
 
 
 class GzipSource {
 GzipSource(Source source) {}
 } ! ! ! ! class InflaterSource {
 InflaterSource(Source source, Inflater inflater) {}
 } class DeflaterSink {
 DeflaterSink(Sink sink, Deflater deflater) {}
 }
  116. 160.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink); File GzipSink FileSink
  117. 161.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink); File BufferedSink GzipSink FileSink
  118. 162.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink);
 bufferedSink.writeUtf8("Hello, hello, hello!"); File FileSink GzipSink BufferedSink 
 
 
 
 "Hello, hello, hello!"
  119. 163.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink);
 bufferedSink.writeUtf8("Hello, hello, hello!"); File FileSink GzipSink BufferedSink Hello, hello, hello!
  120. 164.

    x??H????Q?@?H?? Okio File file = // ...
 Sink fileSink =

    Okio.sink(file);
 Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink);
 bufferedSink.writeUtf8("Hello, hello, hello!"); bufferedSink.close(); File FileSink GzipSink BufferedSink Hello, hello, hello!
  121. 165.

    Hello, hello, hello! Okio File file = // ...
 Sink

    fileSink = Okio.sink(file);
 Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink);
 bufferedSink.writeUtf8("Hello, hello, hello!"); bufferedSink.close(); File FileSink GzipSink BufferedSink x??H????Q?@?H??
  122. 166.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink);
 bufferedSink.writeUtf8("Hello, hello, hello!"); bufferedSink.close(); File FileSink GzipSink BufferedSink x??H????Q?@?H??
  123. 167.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink);
 BufferedSink bufferedSink = Okio.buffer(gzipSink);
 bufferedSink.writeUtf8("Hello, hello, hello!"); bufferedSink.close(); File FileSink GzipSink BufferedSink x??H????Q?@?H??
  124. 168.

    Okio File file = // ...
 Sink fileSink = Okio.sink(file);


    Sink gzipSink = new GzipSink(fileSink);
 Sha1Sink hashingSink = new Sha1Sink(gzipSink);
 BufferedSink bufferedSink = Okio.buffer(hashingSink);
 
 bufferedSink.writeUtf8("Hello, hello, hello!");
 bufferedSink.close();
 
 String hash = hashingSink.hash(); File FileSink GzipSink BufferedSink Sha1Sink
  125. 170.

    Okio Socket socket = //...
 Source socketSource = Okio.source(socket);
 


    Throttler throttler = new Throttler();
 Source throttledSource = throttler.throttle(socketSource);
  126. 171.

    Okio Socket socket = //...
 Source socketSource = Okio.source(socket);
 


    Throttler throttler = new Throttler();
 Source throttledSource = throttler.throttle(socketSource);
 
 BufferedSource bufferedSource = Okio.buffer(throttledSource);
 bufferedSource.readUtf8(10 * 1024);
  127. 172.

    Okio Socket socket = //...
 Source socketSource = Okio.source(socket);
 


    Throttler throttler = new Throttler();
 Source throttledSource = throttler.throttle(socketSource);
 
 BufferedSource bufferedSource = Okio.buffer(throttledSource);
 bufferedSource.readUtf8(10 * 1024);
 
 throttler.bytesPerTimePeriod(50, 1, SECONDS);
 bufferedSource.readUtf8(10 * 1024);
  128. 173.
  129. 175.

    OkHttp OkHttpClient client = new OkHttpClient(); 
 
 Request request

    = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html")
 .build();
  130. 176.

    OkHttp OkHttpClient client = new OkHttpClient(); 
 
 RequestBody requestBody

    = // ... Request request = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html") .post(requestBody)
 .build();
  131. 177.

    OkHttp OkHttpClient client = new OkHttpClient(); 
 
 RequestBody requestBody

    = // ... Request request = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html") .post(requestBody)
 .build(); class RequestBody {
 static RequestBody create(MediaType mediaType, String body) {}
 static RequestBody create(MediaType mediaType, byte[] body) {}
 static RequestBody create(MediaType mediaType, File body) {}
 }X
  132. 178.

    OkHttp class RequestBody {
 static RequestBody create(MediaType mediaType, String body)

    {}
 static RequestBody create(MediaType mediaType, byte[] body) {}
 static RequestBody create(MediaType mediaType, File body) {}
 }X
  133. 179.

    OkHttp abstract class RequestBody {
 static RequestBody create(MediaType mediaType, String

    body) {}
 static RequestBody create(MediaType mediaType, byte[] body) {}
 static RequestBody create(MediaType mediaType, File body) {}
 
 long contentLength();
 MediaType contentType();
 void writeTo(BufferedSink sink);
 }X
  134. 182.

    OkHttp GET  /a-­‐few-­‐ok-­‐libraries.html  HTTP/1.1   Host:  droidcon.ca   Content-­‐Type:  text/plain

      Content-­‐Length:  3000 ! ! ! ! ! ! ! requestBody.writeTo(sink); Socket
  135. 183.

    OkHttp GET  /a-­‐few-­‐ok-­‐libraries.html  HTTP/1.1   Host:  droidcon.ca   Content-­‐Type:  text/plain

      Content-­‐Length:  3000 ! ! ! ! ! ! ! requestBody.writeTo(sink); Socket FixedLengthSink
  136. 184.

    OkHttp GET  /a-­‐few-­‐ok-­‐libraries.html  HTTP/1.1   Host:  droidcon.ca   Content-­‐Type:  text/plain

      Content-­‐Length:  3000 ! ! ! ! ! ! ! requestBody.writeTo(sink); Socket FixedLengthSink ! ! ! ! ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing.
  137. 190.

    OkHttp OkHttpClient client = new OkHttpClient(); 
 
 Request request

    = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html")
 .build();
  138. 191.

    OkHttp OkHttpClient client = new OkHttpClient(); 
 
 Request request

    = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html")
 .build(); 
 
 
 
 
 
 Response response = .execute(); client.newCall(request)
  139. 192.

    OkHttp OkHttpClient client = new OkHttpClient(); 
 
 Request request

    = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html")
 .build(); 
 
 
 
 
 
 Response response = .execute(); 
 
 
 
 
 
 
 
 System.out.println( ); client.newCall(request) response.body().string()
  140. 193.

    OkHttp 
 
 
 
 
 
 .enqueue(new Callback() {


    @Override void onResponse(Response response) {
 
 }
 
 @Override void onFailure(Request request, IOException e) {
 // ...
 }
 }); OkHttpClient client = new OkHttpClient(); 
 
 Request request = new Request.Builder()
 .url("http://droidcon.ca/a-few-ok-libraries.html")
 .build(); 
 
 
 
 
 
 
 
 System.out.println( ); client.newCall(request) response.body().string()
  141. 197.

    OkHttp ResponseBody body = response.body(); 
 String string = body.string();


    Reader reader = body.charStream();
 InputStream stream = body.byteStream();
  142. 198.

    OkHttp ResponseBody body = response.body(); 
 String string = body.string();


    Reader reader = body.charStream();
 InputStream stream = body.byteStream();
 byte[] bytes = body.bytes();
  143. 199.

    OkHttp ResponseBody body = response.body(); 
 String string = body.string();


    Reader reader = body.charStream();
 InputStream stream = body.byteStream();
 byte[] bytes = body.bytes(); ! BufferedSource source = body.source();
  144. 201.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000
  145. 202.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000
  146. 203.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000
  147. 204.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000 FixedLengthSource
  148. 205.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000   ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Length:  3000 FixedLengthSource
  149. 206.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Encoding:  gzip   Content-­‐Length:  3000   ! You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Content-­‐Encoding:  gzip   Content-­‐Length:  3000 GzipSource FixedLengthSource
  150. 207.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Transfer-­‐Encoding:  chunked   ! 1F6   You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! 18C   Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! 158   Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! 1EF   The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! 1E3   My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! 12B   Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! 165   Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Transfer-­‐Encoding:  chunked ChunkedSource
  151. 208.

    OkHttp HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015

     15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Transfer-­‐Encoding:  chunked   ! 1F6   You  think  water  moves  fast?  You  should  see  ice.  It   moves  like  it  has  a  mind.  Like  it  knows  it  killed  the   world  once  and  got  a  taste  for  murder.  After  the   avalanche,  it  took  us  a  week  to  climb  out.  Now,  I  don't   know  exactly  when  we  turned  on  each  other,  but  I  know   that  seven  of  us  survived  the  slide...  and  only  five   made  it  out.  Now  we  took  an  oath,  that  I'm  breaking   now.  We  said  we'd  say  it  was  the  snow  that  killed  the   other  two,  but  it  wasn't.  Nature  is  lethal  but  it   doesn't  hold  a  candle  to  man.   ! 18C   Your  bones  don't  break,  mine  do.  That's  clear.  Your   cells  react  to  bacteria  and  viruses  differently  than   mine.  You  don't  get  sick,  I  do.  That's  also  clear.  But   for  some  reason,  you  and  I  react  the  exact  same  way  to   water.  We  swallow  it  too  fast,  we  choke.  We  get  some  in   our  lungs,  we  drown.  However  unreal  it  may  seem,  we  are   connected,  you  and  I.  We're  on  the  same  curve,  just  on   opposite  ends.   ! 158   Normally,  both  your  asses  would  be  dead  as  fucking   fried  chicken,  but  you  happen  to  pull  this  shit  while   I'm  in  a  transitional  period  so  I  don't  wanna  kill  you,   I  wanna  help  you.  But  I  can't  give  you  this  case,  it   don't  belong  to  me.  Besides,  I've  already  been  through   too  much  shit  this  morning  over  this  case  to  hand  it   over  to  your  dumb  ass.   ! 1EF   The  path  of  the  righteous  man  is  beset  on  all  sides  by   the  iniquities  of  the  selfish  and  the  tyranny  of  evil   men.  Blessed  is  he  who,  in  the  name  of  charity  and  good   will,  shepherds  the  weak  through  the  valley  of   darkness,  for  he  is  truly  his  brother's  keeper  and  the   finder  of  lost  children.  And  I  will  strike  down  upon   thee  with  great  vengeance  and  furious  anger  those  who   would  attempt  to  poison  and  destroy  My  brothers.  And   you  will  know  My  name  is  the  Lord  when  I  lay  My   vengeance  upon  thee.   ! 1E3   My  money's  in  that  office,  right?  If  she  start  giving   me  some  bullshit  about  it  ain't  there,  and  we  got  to  go   someplace  else  and  get  it,  I'm  gonna  shoot  you  in  the   head  then  and  there.  Then  I'm  gonna  shoot  that  bitch  in   the  kneecaps,  find  out  where  my  goddamn  money  is.  She   gonna  tell  me  too.  Hey,  look  at  me  when  I'm  talking  to   you,  motherfucker.  You  listen:  we  go  in  there,  and  that   nigga  Winston  or  anybody  else  is  in  there,  you  the   first  motherfucker  to  get  shot.  You  understand?   ! 12B   Look,  just  because  I  don't  be  givin'  no  man  a  foot   massage  don't  make  it  right  for  Marsellus  to  throw   Antwone  into  a  glass  motherfuckin'  house,  fuckin'  up   the  way  the  nigger  talks.  Motherfucker  do  that  shit  to   me,  he  better  paralyze  my  ass,  'cause  I'll  kill  the   motherfucker,  know  what  I'm  sayin’?   ! 165   Well,  the  way  they  make  shows  is,  they  make  one  show.   That  show's  called  a  pilot.  Then  they  show  that  show  to   the  people  who  make  shows,  and  on  the  strength  of  that   one  show  they  decide  if  they're  going  to  make  more   shows.  Some  pilots  get  picked  and  become  television   programs.  Some  don't,  become  nothing.  She  starred  in   one  of  the  ones  that  became  nothing. ! ! ! ! ! ! ! body.source(); Socket HTTP/1.1  200  OK   Date:  Thu,  9  Apr  2015  15:14:34  GMT   Server:  JakeWharton/2.3.7  (Human)   Content-­‐Type:  application/presentation;  charset=UTF-­‐8   Transfer-­‐Encoding:  chunked ChunkedSource
  152. 214.
  153. 218.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries"); {      "title":  "A  Few  'Ok'  Libraries"
  154. 219.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton"); {      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton"
  155. 220.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray(); {      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [
  156. 221.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray()
 .value("Okio")
 .value("OkHttp")
 .value("Moshi")
 .value("Retrofit"); {      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [          "Okio",          "OkHttp",          "Moshi",          "Retrofit
  157. 222.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray()
 .value("Okio")
 .value("OkHttp")
 .value("Moshi")
 .value("Retrofit")
 .endArray(); {      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]
  158. 223.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray()
 .value("Okio")
 .value("OkHttp")
 .value("Moshi")
 .value("Retrofit")
 .endArray();
 writer.endObject(); {      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]   }
  159. 224.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray()
 .value("Okio")
 .value("OkHttp")
 .value("Moshi")
 .value("Retrofit")
 .endArray();
 writer.endObject(); 
 writer.close(); {  X      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]  Y   }  Z
  160. 225.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray()
 .value("Okio")
 .value("OkHttp")
 .value("Moshi")
 .value("Retrofit")
 .endArray();
 writer.endObject(); 
 writer.close(); Sink sink = //...
 BufferedSink s = Okio.buffer(sink); 
 s.writeByte('{');
 s.writeByte('"').writeUtf8("title").writeByte('"');
 s.writeByte(':').writeByte('"')
 .writeUtf8("A Few 'Ok' Libraries")
 .writeByte('"');
 s.writeByte(',');
 s.writeByte('"').writeUtf8("presenter").writeByte('"');
 s.writeByte(':').writeByte('"')
 .writeUtf8("Jake Wharton")
 .writeByte('"');
 s.writeByte(',');
 s.writeByte('"').writeUtf8("tags").writeByte('"');
 s.writeByte(':').writeByte('[');
 s.writeByte('"').writeUtf8("Okio").writeByte('"');
 s.writeByte(','); s.writeByte('"').writeUtf8("OkHttp").writeByte('"');
 s.writeByte(','); s.writeByte('"').writeUtf8("Moshi").writeByte('"');
 s.writeByte(','); s.writeByte('"').writeUtf8("Retrofit").writeByte('"');
 s.writeByte(']');
 s.writeByte('}');
 s.close();
  161. 226.

    Moshi Sink sink = //...
 JsonWriter writer = new JsonWriter(sink);


    writer.beginObject();
 writer.name("title")
 .value("A Few 'Ok' Libraries");
 writer.name("presenter")
 .value("Jake Wharton");
 writer.name("tags")
 .beginArray()
 .value("Okio")
 .value("OkHttp")
 .value("Moshi")
 .value("Retrofit")
 .endArray();
 writer.endObject(); 
 writer.close(); {X      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [X          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]X   }X
  162. 227.

    Moshi Source source = //...
 JsonReader reader = new JsonReader(source);

    {X      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]X   }X
  163. 228.

    Moshi Source source = //...
 JsonReader reader = new JsonReader(source);


    
 reader.beginObject();
 while (reader.peek() != Token.END_OBJECT) {
 switch (reader.nextName()) {
 case "title":
 String title = reader.nextString();
 // TODO do something with 'title'...
 break;
 case "presenter":
 String presenter = reader.nextString();
 // TODO do something with 'presenter'...
 break;
 case "tags":
 reader.beginArray();
 Set<String> tags = new LinkedHashSet<>();
 while (reader.peek() != Token.END_ARRAY) {
 tags.add(reader.nextString());
 }
 reader.endArray();
 // TODO do something with 'tags'...
 break;
 default: break; // Ignored
 }
 }
 reader.endObject();
 reader.close(); {X      "title":  "A  Few  'Ok'  Libraries",      "presenter":  "Jake  Wharton",      "tags":  [          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]X   }X
  164. 229.

    Moshi Source source = //...
 JsonReader reader = new JsonReader(source);


    
 reader.beginObject();
 while (reader.peek() != Token.END_OBJECT) {
 switch (reader.nextName()) {
 case "title":
 String title = reader.nextString();
 // TODO do something with 'title'...
 break;
 case "presenter":
 String presenter = reader.nextString();
 // TODO do something with 'presenter'...
 break;
 case "tags":
 reader.beginArray();
 Set<String> tags = new LinkedHashSet<>();
 while (reader.peek() != Token.END_ARRAY) {
 tags.add(reader.nextString());
 }
 reader.endArray();
 // TODO do something with 'tags'...
 break;
 default: break; // Ignored
 }
 }
 reader.endObject();
 reader.close(); static final ByteString DOUBLE_QUOTE = ByteString.encodeUtf8("\"");
 
 long i = s.indexOfElement(DOUBLE_QUOTE);
 String string = s.readUtf8(i);
  165. 232.

    Moshi {X      "title":  "A  Few  'Ok'  Libraries",  

       "presenter":  "Jake  Wharton",      "tags":  [X          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]X   }X
  166. 233.

    Moshi {X      "title":  "A  Few  'Ok'  Libraries",  

       "presenter":  "Jake  Wharton",      "tags":  [X          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]X   }X class Presentation {
 String title;
 String presenter;
 Set<String> tags;
 }
  167. 234.

    Moshi {X      "title":  "A  Few  'Ok'  Libraries",  

       "presenter":  "Jake  Wharton",      "tags":  [X          "Okio",          "OkHttp",          "Moshi",          "Retrofit      ]X   }X class Presentation {
 String title;
 String presenter;
 Set<String> tags;
 } JsonAdapter<Presentation> adapter = moshi.adapter(Presentation.class); 
 Presentation presentation = adapter.fromJson(source);
  168. 235.
  169. 238.

    Retrofit interface DroidconMtl {
 @GET("/a-few-ok-libraries.json")
 Presentation okLibraries();
 } RestAdapter ra

    = new RestAdapter.Builder()
 .setEndpoint("http://droidcon.ca")
 .build();
  170. 239.

    Retrofit interface DroidconMtl {
 @GET("/a-few-ok-libraries.json")
 Presentation okLibraries();
 } RestAdapter ra

    = new RestAdapter.Builder()
 .setEndpoint("http://droidcon.ca")
 .build(); 
 
 
 
 DroidconMtl droidconMtl = ra.create(DroidconMtl.class);
  171. 240.

    Retrofit interface DroidconMtl {
 @GET("/a-few-ok-libraries.json")
 Presentation okLibraries();
 } RestAdapter ra

    = new RestAdapter.Builder()
 .setEndpoint("http://droidcon.ca")
 .build(); 
 
 
 
 DroidconMtl droidconMtl = ra.create(DroidconMtl.class); 
 
 
 ! 
 Presentation ok = droidconMtl.okLibraries();
  172. 244.
  173. 254.
  174. 255.

    Retrofit OkHttp MoshiConverter FixedLengthSource FixedLengthSink RequestBody ResponseBody <T> DroidconMtl RequestBody

    ResponseBody Socket execute() okLibraries() Moshi BufferedSink BufferedSource <T>
  175. 256.

    Retrofit OkHttp MoshiConverter FixedLengthSource FixedLengthSink RequestBody ResponseBody <T> DroidconMtl RequestBody

    ResponseBody Socket execute() okLibraries() Moshi BufferedSink BufferedSource <T>
  176. 257.

    Retrofit OkHttp MoshiConverter FixedLengthSource FixedLengthSink RequestBody ResponseBody <T> DroidconMtl RequestBody

    ResponseBody Socket execute() okLibraries() Moshi BufferedSink BufferedSource <T>
  177. 258.

    Retrofit OkHttp MoshiConverter FixedLengthSource FixedLengthSink RequestBody ResponseBody <T> DroidconMtl RequestBody

    ResponseBody Socket execute() okLibraries() Moshi BufferedSink BufferedSource <T>
  178. 259.

    Retrofit OkHttp MoshiConverter FixedLengthSource FixedLengthSink RequestBody ResponseBody <T> DroidconMtl RequestBody

    ResponseBody Socket execute() okLibraries() Moshi BufferedSink BufferedSource <T>