Interface - java.io.Closeable
Created by : Mr Dk.
2020 / 07 / 06 20:29
Nanjing, Jiangsu, China
Definition
่ฟไธชๆฅๅฃๅชๅฎไนไบไธไธชๅฝๆฐ๏ผ็จไบ้ๆพๅฏน่ฑกๆๆ็่ตๆบ๏ผๆฏๅฆๆๅผ็ๆไปถใ
/**
* A {@code Closeable} is a source or destination of data that can be closed.
* The close method is invoked to release resources that the object is
* holding (such as open files).
*
* @since 1.5
*/
public interface Closeable extends AutoCloseable {
}
ไปฅไธๅฝๆฐ็จไบๆๆ็ธๅ ณ็็ณป็ป่ตๆบใๅฆๆไธไธชๆตๅทฒ็ป่ขซๅ ณ้ญ๏ผ้ฃไน้ๅค่ฐ็จ่ฟไธชๅฝๆฐๆฒกๆไฝ็จใ
ๅฏนไบๅฏ่ฝๅจๅ
ณ้ญ่ฟ็จไธญไผๅบ้็ๅบๅ๏ผ้่ฆๆ ผๅคๆณจๆใๅจๆๅบ IOException ไนๅ๏ผๅผบ็ๆจ่ๅๆถๅบๅฑ่ตๆบ๏ผๅนถๅจๅ
้จๆ ่ฎฐ่ฏฅๅฏน่ฑกไธบๅทฒๅ
ณ้ญใ
/**
* Closes this stream and releases any system 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 attention. It is strongly advised
* to relinquish the underlying resources and to internally
* <em>mark</em> the {@code Closeable} as closed, prior to throwing
* the {@code IOException}.
*
* @throws IOException if an I/O error occurs
*/
public void close() throws IOException;