FileDocCategorySizeDatePackage
IllegalFormatCodePointException.javaAPI DocAndroid 1.5 API2269Wed May 06 22:41:04 BST 2009java.util

IllegalFormatCodePointException

public class IllegalFormatCodePointException extends IllegalFormatException implements Serializable
An {@code IllegalFormatCodePointException} will be thrown if an invalid Unicode code point (defined by {@link Character#isValidCodePoint(int)}) is passed as a parameter to a Formatter.
see
java.lang.RuntimeException
since
Android 1.0

Fields Summary
private static final long
serialVersionUID
private int
c
Constructors Summary
public IllegalFormatCodePointException(int c)
Constructs a new {@code IllegalFormatCodePointException} which is specified by the invalid Unicode code point.

param
c the invalid Unicode code point.


                                         
       
        this.c = c;
    
Methods Summary
public intgetCodePoint()
Returns the invalid Unicode code point.

return
the invalid Unicode code point.

        return c;
    
public java.lang.StringgetMessage()
Returns the message string of the IllegalFormatCodePointException.

return
the message string of the IllegalFormatCodePointException.

        StringBuilder buffer = new StringBuilder();
        buffer.append("Code point is ");
        char[] chars = Character.toChars(c);
        for (int i = 0; i < chars.length; i++) {
            buffer.append(chars[i]);
        }
        return buffer.toString();