org.wiztools.wizcrypt
Interface Callback


public interface Callback

Implement this interface to write your own monitoring class.

Author:
subhash
See Also:
WizCrypt, WizCrypt.encrypt(InputStream is, OutputStream os, CipherKey ck, Callback cb, long size), WizCrypt.decrypt(InputStream is, OutputStream os, CipherKey ck, Callback cb, long size)

Method Summary
 void begin()
          begin() is called just before the encryption/decryption process starts.
 void end()
          end() is called immediately after the encryption/decryption process ends.
 void notifyProgress(long value)
          The encryption/decryption process works this way: it loads a bunch of bytes from the InputStream and writes the processed bunch to the OutputStream, and then proceeds to read & process the next bunch.
 

Method Detail

begin

void begin()
begin() is called just before the encryption/decryption process starts.


notifyProgress

void notifyProgress(long value)
The encryption/decryption process works this way: it loads a bunch of bytes from the InputStream and writes the processed bunch to the OutputStream, and then proceeds to read & process the next bunch. notifyProgress(long value) is called after every bunch of bytes that have been processed. The value is either the percentage of the progress in the encryption/decryption process, or the number of bytes that have been processed. This choice depends on the parameter given to the WizCrypt's encrypt()/decrypt() method.

See Also:
WizCrypt.encrypt(InputStream is, OutputStream os, CipherKey ck, Callback cb, long size), WizCrypt.decrypt(InputStream is, OutputStream os, CipherKey ck, Callback cb, long size)

end

void end()
end() is called immediately after the encryption/decryption process ends.



Copyright © 2007. All Rights Reserved.