square/okhttp — pull request #1057 by adriancole (2014-09-22 16:36:16+00:00)
Title: Move frame length constraint to where it is used.

Starting in [http/2 draft 14](https://tools.ietf.org/html/draft-ietf-httpbis-http2-14), the max data length constraint is variable. This exposed a small problem in our SPDY implementation, where we assume that the frame length for reads is the same as writes.

In preparation for #1046, this moves the frame length constraint we expose to the writer, which is the context in which it is used.

This also removes an internal method to write a buffer as a data frame by inspecting its length. Since this method was only used in tests, I removed it.