Message7212

Author jeff250
Recipients amak, fwierzbicki, jeff250, pjenvey, ssweens
Date 2012-06-13.07:33:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1339572800.3.0.488177565409.issue1754@psf.upfronthosting.co.za>
In-reply-to
Content
We wrap with StreamIO, but this wraps with Channels.newChannel(), whose documentation states:

"The resulting channel will not be buffered; it will simply redirect its I/O operations to the given stream. Closing the channel will in turn cause the stream to be closed."

(This is stronger than ReadableByteChannel's general contract, which states that read() "might not fill the buffer, and in fact it might not read any bytes at all.")

Thus, if we pass an InputStream that can return "early" with fewer than the requested bytes (which is allowed by InputStream's read() contract), then the resulting channel from Channels.newChannel() will return "early" too.
History
Date User Action Args
2012-06-13 07:33:20jeff250setmessageid: <1339572800.3.0.488177565409.issue1754@psf.upfronthosting.co.za>
2012-06-13 07:33:20jeff250setrecipients: + jeff250, fwierzbicki, amak, pjenvey, ssweens
2012-06-13 07:33:20jeff250linkissue1754 messages
2012-06-13 07:33:19jeff250create