| Modifier and Type | Field and Description |
|---|---|
| public static final int | BYTES_TO_WRITE_BEFORE_CANCEL_CHECK
The OutputStream checks every this value for cancellation |
| private long | |
| private long | |
| private final MessageDigest | |
| private final OutputStream | |
| private final ProgressMonitor |
| Access | Constructor and Description |
|---|---|
| public | CancellableDigestOutputStream(ProgressMonitor
monitor to update on output progress and check cancel. writeMonitor, OutputStream target stream to receive all contents. out)Initialize a CancellableDigestOutputStream. |
| Modifier and Type | Method and Description |
|---|---|
| public void | flush()
Overrides java. Implements java. Flushes this output stream and forces any buffered output bytes to be written out. |
| public final byte[] | |
| public final ProgressMonitor | Returns: the monitorGet the monitor which is used to update on output progress and check cancel. |
| public final long | Returns: total number of bytes written since stream start.Get total number of bytes written since stream start. |
| public final void | write(int
the b)byte.Implements abstract java. Writes the specified byte to this output stream. |
| public final void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Overrides java. Writes |
| BYTES_TO_WRITE_BEFORE_CANCEL_CHECK | back to summary |
|---|---|
| public static final int BYTES_TO_WRITE_BEFORE_CANCEL_CHECK The OutputStream checks every this value for cancellation | |
| checkCancelAt | back to summary |
|---|---|
| private long checkCancelAt | |
| count | back to summary |
|---|---|
| private long count | |
| md | back to summary |
|---|---|
| private final MessageDigest md | |
| out | back to summary |
|---|---|
| private final OutputStream out | |
| writeMonitor | back to summary |
|---|---|
| private final ProgressMonitor writeMonitor | |
| CancellableDigestOutputStream | back to summary |
|---|---|
| public CancellableDigestOutputStream(ProgressMonitor writeMonitor, OutputStream out) Initialize a CancellableDigestOutputStream.
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Overrides java. Implements java. Doc from java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive.
| |
| getDigest | back to summary |
|---|---|
| public final byte[] getDigest() Obtain the current SHA-1 digest.
| |
| getWriteMonitor | back to summary |
|---|---|
| public final ProgressMonitor getWriteMonitor() Get the monitor which is used to update on output progress and check cancel.
| |
| length | back to summary |
|---|---|
| public final long length() Get total number of bytes written since stream start.
| |
| write | back to summary |
|---|---|
| public final void write(int b) throws IOException Implements abstract java. Doc from java. Writes the specified byte to this output stream. The general
contract for
| |
| write | back to summary |
|---|---|
| public final void write(byte[] b, int off, int len) throws IOException Overrides java. Doc from java. Writes
If
If
| |