1. /*
  2. * @(#)Checksum.java 1.13 00/02/02
  3. *
  4. * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved.
  5. *
  6. * This software is the proprietary information of Sun Microsystems, Inc.
  7. * Use is subject to license terms.
  8. *
  9. */
  10. package java.util.zip;
  11. /**
  12. * An interface representing a data checksum.
  13. *
  14. * @version 1.13, 02/02/00
  15. * @author David Connelly
  16. */
  17. public
  18. interface Checksum {
  19. /**
  20. * Updates the current checksum with the specified byte.
  21. *
  22. * @param b the byte to update the checksum with
  23. */
  24. public void update(int b);
  25. /**
  26. * Updates the current checksum with the specified array of bytes.
  27. * @param b the byte array to update the checksum with
  28. * @param off the start offset of the data
  29. * @param len the number of bytes to use for the update
  30. */
  31. public void update(byte[] b, int off, int len);
  32. /**
  33. * Returns the current checksum value.
  34. * @return the current checksum value
  35. */
  36. public long getValue();
  37. /**
  38. * Resets the checksum to its initial value.
  39. */
  40. public void reset();
  41. }