/** * Repositions this stream to the position at the time the mark method was last called on this input stream. Note * repositioning the blob read stream will disable blob MD5 checking. * * @throws IOException * If this stream has not been marked or if the mark has been invalidated. */ @Override public synchronized void reset() throws IOException { if (this.markedPosition + this.markExpiry < this.currentAbsoluteReadPosition) { throw new IOException(SR.MARK_EXPIRED); } this.validateBlobMd5 = false; this.md5Digest = null; this.reposition(this.markedPosition); }
/** * Repositions this stream to the position at the time the mark method was last called on this input stream. Note * repositioning the blob read stream will disable blob MD5 checking. * * @throws IOException * If this stream has not been marked or if the mark has been invalidated. */ @Override public synchronized void reset() throws IOException { if (this.markedPosition + this.markExpiry < this.currentAbsoluteReadPosition) { throw new IOException(SR.MARK_EXPIRED); } this.validateBlobMd5 = false; this.md5Digest = null; this.reposition(this.markedPosition); }
/** * Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, * end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of * conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of * bytes skipped is returned. If n is negative, no bytes are skipped. * * Note repositioning the blob read stream will disable blob MD5 checking. * * @param n * A <code>long</code> which represents the number of bytes to skip. */ @Override public synchronized long skip(final long n) throws IOException { if (n == 0) { return 0; } if (n < 0 || this.currentAbsoluteReadPosition + n > this.streamLength) { throw new IndexOutOfBoundsException(); } this.validateBlobMd5 = false; this.md5Digest = null; this.reposition(this.currentAbsoluteReadPosition + n); return n; } }
/** * Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, * end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of * conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of * bytes skipped is returned. If n is negative, no bytes are skipped. * * Note repositioning the blob read stream will disable blob MD5 checking. * * @param n * A <code>long</code> which represents the number of bytes to skip. */ @Override public synchronized long skip(final long n) throws IOException { if (n == 0) { return 0; } if (n < 0 || this.currentAbsoluteReadPosition + n > this.streamLength) { throw new IndexOutOfBoundsException(); } this.validateBlobMd5 = false; this.md5Digest = null; this.reposition(this.currentAbsoluteReadPosition + n); return n; } }