博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【转】Closeable, Readable, Flushable, Appendable
阅读量:6265 次
发布时间:2019-06-22

本文共 1718 字,大约阅读时间需要 5 分钟。

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.     * @return  A reference to this Appendable     */    Appendable append(CharSequence csq) throws IOException;    /**     * Appends a subsequence of the specified character sequence to this Appendable.     * @return  A reference to this Appendable     */    Appendable append(CharSequence csq, int start, int end) throws IOException;    /**     * Appends the specified character to this Appendable.     * @return  A reference to this Appendable     */    Appendable append(char c) throws IOException;}

 转自:https://blog.csdn.net/jjavaboy/article/details/43093435

转载于:https://www.cnblogs.com/zhangyue123/p/9277547.html

你可能感兴趣的文章
携程Apollo(阿波罗)配置中心使用Google代码风格文件(在Eclipse使用Google代码风格)(配合阿里巴巴代码规约快速设置)...
查看>>
Hadoop(七)HDFS容错机制详解
查看>>
字符串中去除多余的空格保留一个(C#)
查看>>
Python随机字符串验证码
查看>>
SQL中 patindex函数的用法
查看>>
Vmware 虚拟机无法启动
查看>>
LeetCode: Partition List 解题报告
查看>>
如何查看Python对象的属性
查看>>
你所需要知道的一些git 的使用命令:历史
查看>>
mysql explain输出中type的取值说明
查看>>
iPhone开发之 - 苹果推送通知服务(APNs)编程
查看>>
linux下so动态库一些不为人知的秘密(上)
查看>>
文本框设置只读,后台可获取
查看>>
JAVA:URL之String组件
查看>>
架构,改善程序复用性的设计~目录(附核心原代码)
查看>>
逆向反汇编代码推算C++的局部变量
查看>>
100个推荐的图片/内容滑动条
查看>>
秋式广告杀手:广告拦截原理与杀手组织
查看>>
内存溢出
查看>>
如何重启IIS进程
查看>>