jtulach@119: /* jtulach@119: * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. jtulach@119: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jtulach@119: * jtulach@119: * This code is free software; you can redistribute it and/or modify it jtulach@119: * under the terms of the GNU General Public License version 2 only, as jtulach@119: * published by the Free Software Foundation. Oracle designates this jtulach@119: * particular file as subject to the "Classpath" exception as provided jtulach@119: * by Oracle in the LICENSE file that accompanied this code. jtulach@119: * jtulach@119: * This code is distributed in the hope that it will be useful, but WITHOUT jtulach@119: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jtulach@119: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jtulach@119: * version 2 for more details (a copy is included in the LICENSE file that jtulach@119: * accompanied this code). jtulach@119: * jtulach@119: * You should have received a copy of the GNU General Public License version jtulach@119: * 2 along with this work; if not, write to the Free Software Foundation, jtulach@119: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jtulach@119: * jtulach@119: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jtulach@119: * or visit www.oracle.com if you need additional information or have any jtulach@119: * questions. jtulach@119: */ jtulach@119: jtulach@119: package java.io; jtulach@119: jtulach@119: import java.io.IOException; jtulach@119: jtulach@119: /** jtulach@119: * A {@code Closeable} is a source or destination of data that can be closed. jtulach@119: * The close method is invoked to release resources that the object is jtulach@119: * holding (such as open files). jtulach@119: * jtulach@119: * @since 1.5 jtulach@119: */ jtulach@119: jtulach@119: public interface Closeable extends AutoCloseable { jtulach@119: jtulach@119: /** jtulach@119: * Closes this stream and releases any system resources associated jtulach@119: * with it. If the stream is already closed then invoking this jtulach@119: * method has no effect. jtulach@119: * jtulach@119: * @throws IOException if an I/O error occurs jtulach@119: */ jtulach@119: public void close() throws IOException; jtulach@119: }