JAVA API 學習記錄一 java.lang.*,apijava.lang.

來源:互聯網
上載者:User

JAVA API 學習記錄一 java.lang.*,apijava.lang.


Interface Appendable


append
Appendable append(CharSequence csq)throws java.io.IOException
向此 Appendable 追加指定的字元序列。有時可能沒有追加整個序列,這取決於使用哪個類來實現字元序列 csq。
例如,如果 csq 是 CharBuffer 的一個執行個體,則通過緩衝區的位置和限制來定義要追加的子序列。
參數:csq - 要追加的字串序列。如果 csq 為 null,則向該 Appendable 追加四個字元 "null"。
返回:此 Appendable 的引用拋出:java.io.IOException - 如果發生 I/O 錯誤
--------------------------------------------------------------------------------
append
Appendable append(CharSequence csq,int start,int end)throws java.io.IOException
向此 Appendable 追加指定字元序列的子序列。當 csq 不為 null 時,用 out.append(csq, start, end) 的形式調用此方法與用以下形式調用此方法的行為完全相同:out.append(csq.subSequence(start, end))
參數:csq - 子序列將被追加的字元序列。如果 csq 為 null,則追加四個字元 "null",就好像 csq 包含這些字元一樣。start - 子序列中第一個字元的索引end - 緊隨子序列中最後一個字元的字元的索引
返回:此 Appendable 的引用拋出:IndexOutOfBoundsException - 如果 start 或 end 為負,以及 start 大於 end 或者 end 大於 csq.length()java.io.IOException - 如果發生 I/O 錯誤
--------------------------------------------------------------------------------
append
Appendable append(char c)throws java.io.IOException向此 Appendable 追加指定字元。
參數:c - 要追加的字元\
返回:此 Appendable 的引用拋出:java.io.IOException - 如果發生 I/O 錯誤

Interface AutoCloseablevoid close()throws ExceptionThrows:Exception - if this resource cannot be closed  實現自動關閉資源  



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.