JavaTM 2 Platform
Standard Ed. 6

介面 java.lang.Appendable
的使用

使用 Appendable 的軟體套件
java.io 通過資料串流、序列化和檔案系統提供系統輸入和輸出。 
java.lang 提供利用 Java 程式語言進行程序設計的基礎類別。 
java.nio 定義作為資料容器的緩衝區,並提供其他 NIO 套件的概觀。 
java.rmi.server 提供支持伺服器端 RMI 的類別和介面。 
java.util 包含 collection 框架、遺留的 collection 類別、事件模型、日期和時間設施、國際化和各種實用工具類別(字元串標記產生器、隨機數產生器和位元陣列)。 
 

java.io 中 Appendable 的使用
 

實作 Appendable 的 java.io 中的類別
 class BufferedWriter
          將文本寫入字元輸出串流,緩衝各個字元,從而提供單個字元、陣列和字元串的高效寫入。
 class CharArrayWriter
          此類別實作一個可用作 Writer 的字元緩衝區。
 class FileWriter
          用來寫入字元檔案的便捷類別。
 class FilterWriter
          用於寫入已過濾的字元串流的抽象類別。
 class OutputStreamWriter
          OutputStreamWriter 是字元串流通向位元組串流的橋樑:可使用指定的 charset 將要寫入串流中的字元編碼成位元組。
 class PipedWriter
          傳送的字元輸出串流。
 class PrintStream
          PrintStream 為其他輸出串流添加了功能,使它們能夠方便地列印各種資料值表示形式。
 class PrintWriter
          向文本輸出串流列印物件的格式化表示形式。
 class StringWriter
          一個字元串流,可以用其回收在字元串緩衝區中的輸出來建構字元串。
 class Writer
          寫入字元串流的抽象類別。
 

java.lang 中 Appendable 的使用
 

實作 Appendable 的 java.lang 中的類別
 class StringBuffer
          執行緒安全的可變字元序列。
 class StringBuilder
          一個可變的字元序列。
 

返回 Appendable 的 java.lang 中的方法
 Appendable Appendable.append(char c)
          向此 Appendable 添加指定字元。
 Appendable Appendable.append(CharSequence csq)
          向此 Appendable 添加指定的字元序列。
 Appendable Appendable.append(CharSequence csq, int start, int end)
          向此 Appendable 添加指定字元序列的子序列。
 

java.nio 中 Appendable 的使用
 

實作 Appendable 的 java.nio 中的類別
 class CharBuffer
          字元緩衝區。
 

java.rmi.server 中 Appendable 的使用
 

實作 Appendable 的 java.rmi.server 中的類別
 class LogStream
          已過時。 無替代版本
 

java.util 中 Appendable 的使用
 

返回 Appendable 的 java.util 中的方法
 Appendable Formatter.out()
          返回輸出的目標檔案。
 

參數型別為 Appendable 的 java.util 中的建構子
Formatter(Appendable a)
          建構一個帶指定目標檔案的新 formatter。
Formatter(Appendable a, Locale l)
          建構一個帶指定目標檔案和語言環境的新 formatter。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。