zoukankan      html  css  js  c++  java
  • 【转】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.
         * @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

    你若笃定,世界便不浮躁。
  • 相关阅读:
    JS 时间格式化函数
    jQuery 输入框 在光标位置插入内容, 并选中
    js Html结构转字符串形式显示
    .aspx 页面引用命名空间
    sql随机实现,sql GUID
    一个清华女大学生与一个普通二本男大学生的QQ聊天记录
    asp.net inc 的使用
    JS编码,解码. asp.net(C#)对应解码,编码
    SQL的小常识, 备忘之用, 慢慢补充.
    Js 时间间隔计算(间隔天数)
  • 原文地址:https://www.cnblogs.com/zhangyue123/p/9277547.html
Copyright © 2011-2022 走看看