public class java.net
URISyntaxException


Show All Login
Java SE 6
  
Extends: Throwable > Exception
Details
Checked exception thrown to indicate that a string could not be parsed as a URI reference.
version1.7, 06/04/07
since1.4
See also java.net.URI

Constructors
public URISyntaxException(String input, String reason, int index) Details
Constructs an instance from the given input string, reason, and error index.
inputThe input string
reasonA string explaining why the input could not be parsed
indexThe index at which the parse error occurred, or -1 if the index is not known
ThrowsNullPointerException: If either the input or reason strings are null
ThrowsIllegalArgumentException: If the error index is less than -1
public URISyntaxException(String input, String reason) Details
Constructs an instance from the given input string and reason. The resulting object will have an error index of -1.
inputThe input string
reasonA string explaining why the input could not be parsed
ThrowsNullPointerException: If either the input or reason strings are null

Properties
public int getIndex() Details
Returns an index into the input string of the position at which the parse error occurred, or -1 if this position is not known.
returnThe error index
public String getInput() Details
Returns the input string.
returnThe input string
public String getMessage() Details
Returns a string describing the parse error. The resulting string consists of the reason string followed by a colon character (':'), a space, and the input string. If the error index is defined then the string " at index " followed by the index, in decimal, is inserted after the reason string and before the colon character.
returnA string describing the parse error
public String getReason() Details
Returns a string explaining why the input string could not be parsed.
returnThe reason string