okio
okio copied to clipboard
Document and specify partial failures in File.sink() and File.source().
Because these are implemented segment-at-a-time we have the opportunity for a syscall to succeed on one access and fail on the next.
We should write tests to exercise this situation, and confirm the resulting state is well-defined. In particular:
- Users’ provided input buffers are in an acceptable state. Can these grow or shrink partially?
- Subsequent accesses reliably fail. Otherwise we need to guarantee what bytes are accessed next.