@Override public synchronized void reset() throws IOException { super.reset(); if (markSupported()) { streamPosition = markedStreamPosition; blockPosition = markedBlockPosition; } }
@Override public void close() throws IOException { try { super.close(); } finally { client.getConnectionManager().shutdown(); } }
@Override public synchronized void mark(int readlimit) { super.mark(readlimit); if (markSupported()) { markedStreamPosition = streamPosition; markedBlockPosition = blockPosition; } }
/** * {@inheritDoc} * * <p>Delegate to {@link S3ObjectInputStream#abort()} if there is data remaining in the stream. If * the stream has been read completely, with no data remaining, safely close the stream. * * @see {@link S3ObjectInputStream#abort()} */ @Override public void close() throws IOException { if (eof) { super.close(); } else { doAbort(); } }
/** Resets the wrapped input stream and the in progress message digest. */ @Override public void reset() throws IOException { super.reset(); if (digestLastMarked != null) { try { digest = (MessageDigest) digestLastMarked.clone(); } catch (CloneNotSupportedException e) { // should never occur throw new IllegalStateException("unexpected", e); } } }
@Override public void mark(int readlimit) { super.mark(readlimit); if (markSupported()) { try { digestLastMarked = (MessageDigest) digest.clone(); } catch (CloneNotSupportedException e) { // should never occur throw new IllegalStateException("unexpected", e); } } }
/** {@inheritDoc} */ @Override public void reset() throws IOException { super.reset(); eof = false; }