1. /*
  2. * @(#)Closeable.java 1.4 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.io;
  8. import java.io.IOException;
  9. /**
  10. * A <tt>Closeable</tt> is a source or destination of data that can be closed.
  11. * The close method is invoked to release resources that the object is
  12. * holding (such as open files).
  13. *
  14. * @version 1.4 03/12/19
  15. * @since 1.5
  16. */
  17. public interface Closeable {
  18. /**
  19. * Closes this stream and releases any system resources associated
  20. * with it. If the stream is already closed then invoking this
  21. * method has no effect.
  22. *
  23. * @throws IOException if an I/O error occurs
  24. */
  25. public void close() throws IOException;
  26. }