JavaTM 2 Platform
Standard Ed. 6

類別 java.nio.charset.CharsetDecoder
的使用

使用 CharsetDecoder 的軟體套件
java.io 通過資料串流、序列化和檔案系統提供系統輸入和輸出。 
java.nio.channels 定義了各種通道,這些通道表示到能夠執行 I/O 操作的實體(如檔案和Socket)的連接;定義了用於多路傳輸的、非阻塞 I/O 操作的選擇器。 
java.nio.charset 定義用來在位元組和 Unicode 字元之間轉換的 charset、解碼器和編碼器。 
 

java.io 中 CharsetDecoder 的使用
 

參數型別為 CharsetDecoder 的 java.io 中的建構子
InputStreamReader(InputStream in, CharsetDecoder dec)
          創建使用給定字元集解碼器的 InputStreamReader。
 

java.nio.channels 中 CharsetDecoder 的使用
 

參數型別為 CharsetDecoder 的 java.nio.channels 中的方法
static Reader Channels.newReader(ReadableByteChannel ch, CharsetDecoder dec, int minBufferCap)
          建構一個 reader,它用給定的解碼器對取自給定通道的位元組進行解碼。
 

java.nio.charset 中 CharsetDecoder 的使用
 

返回 CharsetDecoder 的 java.nio.charset 中的方法
abstract  CharsetDecoder Charset.newDecoder()
          為此 charset 建構新的解碼器。
 CharsetDecoder CharsetDecoder.onMalformedInput(CodingErrorAction newAction)
          更改此解碼器對錯誤輸入錯誤的操作。
 CharsetDecoder CharsetDecoder.onUnmappableCharacter(CodingErrorAction newAction)
          更改此解碼器對不可映射的字元錯誤的操作。
 CharsetDecoder CharsetDecoder.replaceWith(String newReplacement)
          更改此解碼器的替換值。
 CharsetDecoder CharsetDecoder.reset()
          重置此解碼器,清除所有內部狀態。
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

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