1. /*
  2. * @(#)Checksum.java 1.11 01/11/29
  3. *
  4. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.util.zip;
  8. /**
  9. * An interface representing a data checksum.
  10. *
  11. * @version 1.11, 11/29/01
  12. * @author David Connelly
  13. */
  14. public
  15. interface Checksum {
  16. /**
  17. * Updates the current checksum with the specified byte.
  18. */
  19. public void update(int b);
  20. /**
  21. * Updates the current checksum with the specified array of bytes.
  22. */
  23. public void update(byte[] b, int off, int len);
  24. /**
  25. * Returns the current checksum value.
  26. */
  27. public long getValue();
  28. /**
  29. * Resets the checksum to its initial value.
  30. */
  31. public void reset();
  32. }