Top Description Fields Constructors Methods
com.ibm.icu.text

public Class StringPrepParseException

extends ParseException
Class Inheritance
Imports
java.text.ParseException

Exception that signals an error has occurred while parsing the input to StringPrep or IDNA.
Author
Ram Viswanadha
ICU Status
Stable since ICU 2.8.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
private int
public static final int
public static final int
public static final int
private int
line

The line on which the error occurred.

private static final int
private StringBuffer
postContext

Textual context after the error.

private StringBuffer
preContext

Textual context before the error.

public static final int
pack-priv static final long
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public
StringPrepParseException(String
A string describing the type of error that occurred
message
,
int
The error that has occurred
error
)

Construct a ParseException object with the given message and error code

public
StringPrepParseException(String
A string describing the type of error that occurred
message
,
int
The error that has occurred
error
,
String
The input rules string
rules
,
int
The position of error in the rules string
pos
)

Construct a ParseException object with the given message and error code

public
StringPrepParseException(String
A string describing the type of error that occurred
message
,
int
The error that has occurred
error
,
String
The input rules string
rules
,
int
The position of error in the rules string
pos
,
int
The line number at which the error has occurred. If the parse engine is not using this field, it should set it to zero. Otherwise it should be a positive integer. The default value of this field is -1. It will be set to 0 if the code populating this struct is not using line numbers.
lineNumber
)

Construct a ParseException object with the given message and error code

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the objects are equal, false if unequal
equals
(Object
The exception that this object should be compared to
other
)

Overrides java.lang.Object.equals.

Compare this ParseException to another and evaluate if they are equal.
public int

Returns:

The error code
getError
()

Returns the error code of this exception.

public int

Returns:

a hash code value for this object.
hashCode
()

Overrides java.lang.Object.hashCode.

Mock implementation of hashCode().
private void
setContext(String str, int pos)

private void
setPostContext(String str, int pos)

private void
setPostContext(char[] str, int pos)

private void
setPreContext(String str, int pos)

private void
setPreContext(char[] str, int pos)

public String

Returns:

String
toString
()

Overrides java.lang.Throwable.toString.

Returns the position of error in the rules string
Inherited from java.text.ParseException:
getErrorOffset

Field Detail

ACE_PREFIX_ERRORback to summary
public static final int ACE_PREFIX_ERROR
ICU Status
Stable since ICU 2.8.
BUFFER_OVERFLOW_ERRORback to summary
public static final int BUFFER_OVERFLOW_ERROR
ICU Status
Stable since ICU 2.8.
CHECK_BIDI_ERRORback to summary
public static final int CHECK_BIDI_ERROR
ICU Status
Stable since ICU 2.8.
DOMAIN_NAME_TOO_LONG_ERRORback to summary
public static final int DOMAIN_NAME_TOO_LONG_ERROR
ICU Status
Stable since ICU 3.8.
errorback to summary
private int error
ILLEGAL_CHAR_FOUNDback to summary
public static final int ILLEGAL_CHAR_FOUND
ICU Status
Stable since ICU 2.8.
INVALID_CHAR_FOUNDback to summary
public static final int INVALID_CHAR_FOUND
ICU Status
Stable since ICU 2.8.
LABEL_TOO_LONG_ERRORback to summary
public static final int LABEL_TOO_LONG_ERROR
ICU Status
Stable since ICU 2.8.
lineback to summary
private int line

The line on which the error occurred. If the parse engine is not using this field, it should set it to zero. Otherwise it should be a positive integer. The default value of this field is -1. It will be set to 0 if the code populating this struct is not using line numbers.

PARSE_CONTEXT_LENback to summary
private static final int PARSE_CONTEXT_LEN
postContextback to summary
private StringBuffer postContext

Textual context after the error. Null-terminated. May be the empty string if not implemented by parser.

preContextback to summary
private StringBuffer preContext

Textual context before the error. Null-terminated. May be the empty string if not implemented by parser.

PROHIBITED_ERRORback to summary
public static final int PROHIBITED_ERROR
ICU Status
Stable since ICU 2.8.
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.text.ParseException.serialVersionUID.

STD3_ASCII_RULES_ERRORback to summary
public static final int STD3_ASCII_RULES_ERROR
ICU Status
Stable since ICU 2.8.
UNASSIGNED_ERRORback to summary
public static final int UNASSIGNED_ERROR
ICU Status
Stable since ICU 2.8.
VERIFICATION_ERRORback to summary
public static final int VERIFICATION_ERROR
ICU Status
Stable since ICU 2.8.
ZERO_LENGTH_LABELback to summary
public static final int ZERO_LENGTH_LABEL
ICU Status
Stable since ICU 2.8.

Constructor Detail

StringPrepParseExceptionback to summary
public StringPrepParseException(String message, int error)

Construct a ParseException object with the given message and error code

Parameters
message:String

A string describing the type of error that occurred

error:int

The error that has occurred

ICU Status
Stable since ICU 2.8.
StringPrepParseExceptionback to summary
public StringPrepParseException(String message, int error, String rules, int pos)

Construct a ParseException object with the given message and error code

Parameters
message:String

A string describing the type of error that occurred

error:int

The error that has occurred

rules:String

The input rules string

pos:int

The position of error in the rules string

ICU Status
Stable since ICU 2.8.
StringPrepParseExceptionback to summary
public StringPrepParseException(String message, int error, String rules, int pos, int lineNumber)

Construct a ParseException object with the given message and error code

Parameters
message:String

A string describing the type of error that occurred

error:int

The error that has occurred

rules:String

The input rules string

pos:int

The position of error in the rules string

lineNumber:int

The line number at which the error has occurred. If the parse engine is not using this field, it should set it to zero. Otherwise it should be a positive integer. The default value of this field is -1. It will be set to 0 if the code populating this struct is not using line numbers.

ICU Status
Stable since ICU 2.8.

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Compare this ParseException to another and evaluate if they are equal. The comparison works only on the type of error and does not compare the rules strings, if any, for equality.

Parameters
other:Object

The exception that this object should be compared to

Returns:boolean

true if the objects are equal, false if unequal

Annotations
@Override
ICU Status
Stable since ICU 2.8.
getErrorback to summary
public int getError()

Returns the error code of this exception. This method is only used for testing to verify the error.

Returns:int

The error code

ICU Status
Stable since ICU 3.8.
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Mock implementation of hashCode(). This implementation always returns a constant value. When Java assertion is enabled, this method triggers an assertion failure.

Returns:int

a hash code value for this object.

Annotations
@Override
ICU Status
Stable since ICU 2.8.
setContextback to summary
private void setContext(String str, int pos)
setPostContextback to summary
private void setPostContext(String str, int pos)
setPostContextback to summary
private void setPostContext(char[] str, int pos)
setPreContextback to summary
private void setPreContext(String str, int pos)
setPreContextback to summary
private void setPreContext(char[] str, int pos)
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Returns the position of error in the rules string

Returns:String

String

Annotations
@Override
ICU Status
Stable since ICU 2.8.