The message got garbled up so I trying to send it again. Hi I have few questions about implementation of inputstream in S3.From S3AInputStream.java 1) public synchronized long getPos() throws IOException {return (nextReadPos < 0) ? 0 : nextReadPos;} Why does it return nextReadPos not pos?In memeber definition for pos /*** This is the public position; the one set in {@link #seek(long)}* and returned in {@link #getPos()}.*/private long pos; 2)seekInStreamIn the last lines you have: // close the stream; if read the object will be opened at the new poscloseStream("seekInStream()", this.requestedStreamLen);pos = targetPos; Why you need this line? Shouldn`t pos be updated with actual skipped value? As you did: | if (skipped > 0) { | |
| pos += skipped; | Thanks On Tuesday, August 2, 2016 10:17 AM, Mr rty ff <yash...@yahoo.com> wrote: Hi I have few questions about implementation of inputstream in S3. 1)public synchronized long getPos() throws IOException {return (nextReadPos < 0) ? 0 : nextReadPos;}Why does it return nextReadPos not pos?In memeber definition for pos/*** This is the public position; the one set in {@link #seek(long)}* and returned in {@link #getPos()}.*/private long pos; 2)seekInStreamIn the last lines you have:// close the stream; if read the object will be opened at the new poscloseStream("seekInStream()", this.requestedStreamLen);pos = targetPos; Why you need this line? Shouldn`t pos be updated with actual skipped value? As you did: | if (skipped > 0) { | | | pos += skipped; | Thanks