low-gc-membuffers icon indicating copy to clipboard operation
low-gc-membuffers copied to clipboard

Add convenience `InputStream` implementations, to read from streamy byte buffer

Open cowtowncoder opened this issue 11 years ago • 0 comments

To improve interoperability, it'd be good to add InputStream implementations. Since it is byte-oriented, it is only applicable to byte-based buffers; and probably only streamy ones.

One variation is that of what to do when all current content has been read: so most likely two impls should be provided:

  1. "Snapshot" variant which considers end of content to be end-of-input
  2. Blocking variant that blocks when it runs out of content, waking up if new content is added -- this works bit like a pipe.

cowtowncoder avatar Jun 29 '13 21:06 cowtowncoder