repository.grepcode.com$java$root@jdk$openjdk@6-b14
repository.grepcode.com$java$root@jdk$openjdk@6-b14@java$nio$charset$CodingErrorAction.java
file
oh
o
[]
Consider the following code:
public class ReadingTest {
public void readAndPrint(String usingEncoding) throws Exception {
ByteArrayInputStream bais = new ByteArrayInputStream(new byte[]{(byte) 0xC2, (byte) 0xB5}); // 'micro' sign UTF-8 representation
InputStreamReader isr = new InputStreamReader(bais, usingEncoding);
char[] cbuf = new char[2];
isr.read(cbuf...
package java.nio.charset;
A typesafe enumeration for coding-error actions.
Instances of this class are used to specify how malformed-input and
unmappable-character errors are to be handled by charset decoders and encoders.
- Author(s):
- Mark Reinhold
- JSR-51 Expert Group
- Since:
- 1.4
Action indicating that a coding error is to be handled by dropping the
erroneous input and resuming the coding operation.
Action indicating that a coding error is to be handled by dropping the
erroneous input, appending the coder's replacement value to the output
buffer, and resuming the coding operation.
Action indicating that a coding error is to be reported, either by
returning a
CoderResult object or by throwing a
CharacterCodingException, whichever is appropriate for the method
implementing the coding process.
Returns a string describing this action.
- Returns:
- A descriptive string