大道之行,天下为公。这篇文章主要讲述Closeable, Readable, Flushable, Appendable相关的知识,希望能为你提供帮助。
Closeable:
package java.io; import java.io.IOException; public interface Closeable { /** * Closes this stream and releases any system resources associated * with it. If the stream is already closed then invoking this * method has no effect. */ public void close() throws IOException; }
Readable:
package java.lang; import java.io.IOException; public interface Readable {/** * Attempts to read characters into the specified character buffer. * The buffer is used as a repository of characters as-is: the only * changes made are the results of a put operation. No flipping or * rewinding of the buffer is performed. */ public int read(java.nio.CharBuffer cb) throws IOException; }
Flushable:
package java.io; import java.io.IOException; public interface Flushable {/** * Flushes this stream by writing any buffered output to the underlying stream. */ void flush() throws IOException; }
Appendable:
package java.lang; import java.io.IOException; public interface Appendable {/** * Appends the specified character sequence to this Appendable. * @returnA reference to this Appendable */ Appendable append(CharSequence csq) throws IOException; /** * Appends a subsequence of the specified character sequence to this Appendable. * @returnA reference to this Appendable */ Appendable append(CharSequence csq, int start, int end) throws IOException; /** * Appends the specified character to this Appendable. * @returnA reference to this Appendable */ Appendable append(char c) throws IOException; }
【Closeable, Readable, Flushable, Appendable】 转自:https://blog.csdn.net/jjavaboy/article/details/43093435
推荐阅读
- unity配置Android SDK,并构建导出apk格式
- Android 源码分析 SystemServer 进程
- eclipse创建web项目webapp目录为空(没有web.xml文件)修改web版本号
- Android 源码分析 Zygote 进程
- Android悬浮窗原理解析(Window)[源码]
- Where is virtualenvwrapper.sh after pip install?
- Android Studio3.0版本安装Sync Project With Gradle Files 按钮“消失”了
- Mybatis学习系列Mapper接口动态代理
- Mybatis-Generator自动生成DaoModelMapping等相关映射文件(懒人版)