improve LimitedInputStream, LimitedReader