Closed
Description
I think the original intention was to find a way to replay InputStream bodies in case of a retry (connection crash), but I don't think it can work:
- it sets the
readlimit
to 0, meaning that the mark becomes invalid after the first read reset
behavior is completely inconsistent across implementations. AByteArrayInputStream
will always be able to reset as everything is in memory, but aBufferedInputStream
will crash on reset if the mark moved out of the buffer, whilemarkSupported
always return true (so there's no way to detect that reset will fail beforehand).
Dropping this non feature that cannot work.