@Override public void mark(int readlimit) { if (markSupported()) { super.mark(readlimit); digestLastMarked = cloneFrom(digest); } }
/** * Resets the wrapped input stream and the in progress message digest. */ @Override public void reset() throws IOException { if (markSupported()) { super.reset(); if (digestLastMarked == null) { resetDigest(); } else { digest = cloneFrom(digestLastMarked); } } else { throw new IOException("mark/reset not supported"); } }
@Override public void mark(int readlimit) { if (markSupported()) { super.mark(readlimit); digestLastMarked = cloneFrom(digest); } }
/** * Resets the wrapped input stream and the in progress message digest. */ @Override public void reset() throws IOException { if (markSupported()) { super.reset(); digest = (digestLastMarked == null) // This is necessary so that should there be a reset without a // preceding mark, the MD5 would still be computed correctly. ? newMD5() : cloneFrom(digestLastMarked); } else { throw new IOException("mark/reset not supported"); } }
@Override public void mark(int readlimit) { if (markSupported()) { super.mark(readlimit); digestLastMarked = cloneFrom(digest); } }
@Override public void mark(int readlimit) { if (markSupported()) { super.mark(readlimit); digestLastMarked = cloneFrom(digest); } }
/** * Resets the wrapped input stream and the in progress message digest. */ @Override public void reset() throws IOException { if (markSupported()) { super.reset(); digest = (digestLastMarked == null) // This is necessary so that should there be a reset without a // preceding mark, the MD5 would still be computed correctly. ? newMD5() : cloneFrom(digestLastMarked); } else { throw new IOException("mark/reset not supported"); } }
/** * Resets the wrapped input stream and the in progress message digest. */ @Override public void reset() throws IOException { if (markSupported()) { super.reset(); if (digestLastMarked == null) { resetDigest(); } else { digest = cloneFrom(digestLastMarked); } } else { throw new IOException("mark/reset not supported"); } }