コード例 #1
0
 @Override
 public synchronized void reset() throws IOException {
   super.reset();
   if (markSupported()) {
     streamPosition = markedStreamPosition;
     blockPosition = markedBlockPosition;
   }
 }
コード例 #2
0
ファイル: HttpUtils.java プロジェクト: jmchen/aws-sdk-java
 @Override
 public void close() throws IOException {
   try {
     super.close();
   } finally {
     client.getConnectionManager().shutdown();
   }
 }
コード例 #3
0
 @Override
 public synchronized void mark(int readlimit) {
   super.mark(readlimit);
   if (markSupported()) {
     markedStreamPosition = streamPosition;
     markedBlockPosition = blockPosition;
   }
 }
コード例 #4
0
 /**
  * {@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();
   }
 }
コード例 #5
0
 /** 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);
     }
   }
 }
コード例 #6
0
 @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);
     }
   }
 }
コード例 #7
0
 /** {@inheritDoc} */
 @Override
 public void reset() throws IOException {
   super.reset();
   eof = false;
 }