Java.io.Closeable

Source: Internet
Author: User

package java.io;import java.io.ioexception;/** * A {@ Code closeable} is a source or destination of data, can be closed. * The Close method is invoked to release resources, the object is * holding (such as open files). * * @since 1.5 */public interface closeable extends autocloseable {/** * closes this stream and releases any syste M resources Associated * with it.     If The stream is already closed then invoking this * method has no effect. * * <p> as noted in {@link autocloseable#close ()}, cases where the * Close may fail require careful attentio N. It is strongly advised * to relinquish the underlying resources and to internally * <em>mark</em> T     He {@code closeable} as closed, prior to throwing * the {@code IOException}. * * @throws IOException If an I/O error occurs */public void Close () throws IOException;} 

According to the official note, the approximate translation is: closeable is a data source or destination that can be closed. Call the Close method to free resources saved by the object (such as open files).

closes this stream and frees all system resources associated with this stream. If the stream has been closed, calling this method is not valid.

Java.io.Closeable

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.