java.net
Class URISyntaxException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by java.net.URISyntaxException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable

public class URISyntaxException
extends Exception sample code for java.lang.Exception definition code for java.lang.Exception

Checked exception thrown to indicate that a string could not be parsed as a URI reference.

See Also:
URI sample code for java.net.URI definition code for java.net.URI , Serialized Form

Constructor Summary
URISyntaxException sample code for java.net.URISyntaxException.URISyntaxException(java.lang.String, java.lang.String) definition code for java.net.URISyntaxException.URISyntaxException(java.lang.String, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  input, String sample code for java.lang.String definition code for java.lang.String  reason)
          Constructs an instance from the given input string and reason.
URISyntaxException sample code for java.net.URISyntaxException.URISyntaxException(java.lang.String, java.lang.String, int) definition code for java.net.URISyntaxException.URISyntaxException(java.lang.String, java.lang.String, int) (String sample code for java.lang.String definition code for java.lang.String  input, String sample code for java.lang.String definition code for java.lang.String  reason, int index)
          Constructs an instance from the given input string, reason, and error index.
 
Method Summary
 int getIndex sample code for java.net.URISyntaxException.getIndex() definition code for java.net.URISyntaxException.getIndex() ()
          Returns an index into the input string of the position at which the parse error occurred, or -1 if this position is not known.
 String sample code for java.lang.String definition code for java.lang.String getInput sample code for java.net.URISyntaxException.getInput() definition code for java.net.URISyntaxException.getInput() ()
          Returns the input string.
 String sample code for java.lang.String definition code for java.lang.String getMessage sample code for java.net.URISyntaxException.getMessage() definition code for java.net.URISyntaxException.getMessage() ()
          Returns a string describing the parse error.
 String sample code for java.lang.String definition code for java.lang.String getReason sample code for java.net.URISyntaxException.getReason() definition code for java.net.URISyntaxException.getReason() ()
          Returns a string explaining why the input string could not be parsed.
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getCause sample code for java.lang.Throwable.getCause() definition code for java.lang.Throwable.getCause() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , initCause sample code for java.lang.Throwable.initCause(java.lang.Throwable) definition code for java.lang.Throwable.initCause(java.lang.Throwable) , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) , toString sample code for java.lang.Throwable.toString() definition code for java.lang.Throwable.toString()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

URISyntaxException sample code for java.net.URISyntaxException(java.lang.String, java.lang.String, int) definition code for java.net.URISyntaxException(java.lang.String, java.lang.String, int)

public URISyntaxException(String sample code for java.lang.String definition code for java.lang.String  input,
                          String sample code for java.lang.String definition code for java.lang.String  reason,
                          int index)
Constructs an instance from the given input string, reason, and error index.

Parameters:
input - The input string
reason - A string explaining why the input could not be parsed
index - The index at which the parse error occurred, or -1 if the index is not known
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - If either the input or reason strings are null
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - If the error index is less than -1

URISyntaxException sample code for java.net.URISyntaxException(java.lang.String, java.lang.String) definition code for java.net.URISyntaxException(java.lang.String, java.lang.String)

public URISyntaxException(String sample code for java.lang.String definition code for java.lang.String  input,
                          String sample code for java.lang.String definition code for java.lang.String  reason)
Constructs an instance from the given input string and reason. The resulting object will have an error index of -1.

Parameters:
input - The input string
reason - A string explaining why the input could not be parsed
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - If either the input or reason strings are null
Method Detail

getInput sample code for java.net.URISyntaxException.getInput() definition code for java.net.URISyntaxException.getInput()

public String sample code for java.lang.String definition code for java.lang.String  getInput()
Returns the input string.

Returns:
The input string

getReason sample code for java.net.URISyntaxException.getReason() definition code for java.net.URISyntaxException.getReason()

public String sample code for java.lang.String definition code for java.lang.String  getReason()
Returns a string explaining why the input string could not be parsed.

Returns:
The reason string

getIndex sample code for java.net.URISyntaxException.getIndex() definition code for java.net.URISyntaxException.getIndex()

public int getIndex()
Returns an index into the input string of the position at which the parse error occurred, or -1 if this position is not known.

Returns:
The error index

getMessage sample code for java.net.URISyntaxException.getMessage() definition code for java.net.URISyntaxException.getMessage()

public String sample code for java.lang.String definition code for java.lang.String  getMessage()
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.

Overrides:
getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() in class Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
Returns:
A string describing the parse error