1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-24 04:02:07 +03:00
Files
okhttp/mockwebserver
jwilson 32a2b1d8d0 OkBuffer API sketch.
I'm unhappy with java.io:
 * No timeouts.
 * Every layer needs to copy bytes around. Always copying bytes.
 * Features like mark/reset and available() are clumsy.
 * Its awkard in mixed text/binary protocols like HTTP because
   character decoding is separate and takes over the stream.

Unfortunately java.nio isn't better, just different:
 * It's complex.
 * Buffers are fixed size.
 * No built-in buffer pooling.
 * Features like mark/reset/position are clumsy.

This is an obnoxious attempt at a 3rd I/O interface, mostly
inspired by InputStream and OutputStream, but using growable
buffers instead of byte arrays as the core data container.
2014-01-26 18:09:56 -05:00
..
2014-01-26 18:09:56 -05:00