Build 1.0_r1(from source)

java.net
Class URISyntaxException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.net.URISyntaxException
All Implemented Interfaces:
Serializable

public class URISyntaxException
extends Exception

Represents an exception that occurred during parsing of a URI.

See Also:
Serialized Form

Constructor Summary
URISyntaxException(String input, String reason)
          Constructs a URISyntaxException containing the string that caused the exception and a description of the error.
URISyntaxException(String input, String reason, int index)
          Constructs a URISyntaxException, containing the input that caused the exception, a description of the problem, and the index at which the error occurred.
 
Method Summary
 int getIndex()
          Returns the index at which the syntax error was found, or -1 if the index is unknown/unavailable.
 String getInput()
          Returns the String that contained the syntax error
 String getMessage()
          Returns a description of the exception, including the reason, the string that had the syntax error, and the index of the syntax error if available.
 String getReason()
          Returns a String describing the syntax error in the URI string
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

URISyntaxException

public URISyntaxException(String input,
                          String reason,
                          int index)
Constructs a URISyntaxException, containing the input that caused the exception, a description of the problem, and the index at which the error occurred.

Parameters:
input -
reason -
index -
Throws:
NullPointerException - if input or reason is null
IllegalArgumentException - if index <>

URISyntaxException

public URISyntaxException(String input,
                          String reason)
Constructs a URISyntaxException containing the string that caused the exception and a description of the error.

Parameters:
input -
reason -
Throws:
NullPointerException - if input or reason is null
Method Detail

getIndex

public int getIndex()
Returns the index at which the syntax error was found, or -1 if the index is unknown/unavailable.

Returns:
the index of the syntax error

getReason

public String getReason()
Returns a String describing the syntax error in the URI string

Returns:
a String describing the syntax error

getInput

public String getInput()
Returns the String that contained the syntax error

Returns:
the String that caused the exception

getMessage

public String getMessage()
Returns a description of the exception, including the reason, the string that had the syntax error, and the index of the syntax error if available.

Overrides:
getMessage in class Throwable
Returns:
a String containing information about the exception.
See Also:
Throwable.getMessage()

Build 1.0_r1(from source)

Please submit a feedback, bug or feature