软件包 | 描述 |
---|---|
java.nio.charset |
定义了字符集,解码器和编码器,字节和Unicode字符之间的转换。
|
Modifier and Type | Field and Description |
---|---|
static CoderResult |
CoderResult.OVERFLOW
结果对象表示溢出,这意味着输出缓冲区中有足够的空间。
|
static CoderResult |
CoderResult.UNDERFLOW
结果表明底流,意味着要么输入缓冲区已被完全消耗,如果输入缓冲区是不空的,这需要额外的输入。
|
Modifier and Type | Method and Description |
---|---|
CoderResult |
CharsetDecoder.decode(ByteBuffer in, CharBuffer out, boolean endOfInput)
将尽可能多的字节从给定的输入缓冲区,将结果写入给定的输出缓冲器。
|
protected abstract CoderResult |
CharsetDecoder.decodeLoop(ByteBuffer in, CharBuffer out)
将一个或多个字节为一个或多个字符。
|
CoderResult |
CharsetEncoder.encode(CharBuffer in, ByteBuffer out, boolean endOfInput)
从给定的输入缓冲区中尽可能多的字符编码,将结果写入给定的输出缓冲区中。
|
protected abstract CoderResult |
CharsetEncoder.encodeLoop(CharBuffer in, ByteBuffer out)
将一个或多个字符编码成一个或多个字节。
|
CoderResult |
CharsetEncoder.flush(ByteBuffer out)
刷新编码器。
|
CoderResult |
CharsetDecoder.flush(CharBuffer out)
冲这个解码器。
|
protected CoderResult |
CharsetEncoder.implFlush(ByteBuffer out)
刷新编码器。
|
protected CoderResult |
CharsetDecoder.implFlush(CharBuffer out)
冲这个解码器。
|
static CoderResult |
CoderResult.malformedForLength(int length)
静态工厂方法返回一个给定长度的描述错误的输入误差的唯一对象。
|
static CoderResult |
CoderResult.unmappableForLength(int length)
静态工厂方法返回一个描述给定的长度无法映射的字符错误的独特结果对象。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.