KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > nio > charset > UnmappableCharacterException


1 /*
2  * @(#)UnmappableCharacterException.java 1.4 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.nio.charset;
9
10
11 /**
12  * Checked exception thrown when an input character (or byte) sequence
13  * is valid but cannot be mapped to an output byte (or character)
14  * sequence. </p>
15  *
16  * @since 1.4
17  */

18
19 public class UnmappableCharacterException
20     extends CharacterCodingException JavaDoc
21 {
22
23     private int inputLength;
24
25     public UnmappableCharacterException(int inputLength) {
26     this.inputLength = inputLength;
27     }
28
29     public int getInputLength() {
30     return inputLength;
31     }
32
33     public String JavaDoc getMessage() {
34     return "Input length = " + inputLength;
35     }
36
37 }
38
Popular Tags