@ Override public WritableBuffer allocate ( int capacityHint ) { capacityHint = Math . min ( MAX_BUFFER , Math . max ( MIN_BUFFER , capacityHint ) ) ; return new OkHttpWritableBuffer ( new Buffer ( ) , capacityHint ) ; }
For OkHttp we will often return a buffer smaller than the requested capacity as this is the mechanism for chunking a large GRPC message over many DATA frames .