Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.net
Class URISyntaxException  view URISyntaxException download URISyntaxException.java

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

public class URISyntaxException
extends java.lang.Exception

This exception is thrown when a String cannot be parsed as a URI.

Since:
1.4

Nested Class Summary
 
Nested classes inherited from class java.lang.Throwable
 
Field Summary
private  int index
          The index of failure.
private  java.lang.String input
          The failed input.
private static long serialVersionUID
          Compatible with JDK 1.4+.
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
URISyntaxException(java.lang.String input, java.lang.String msg)
          Create an exception from the invalid string, with the index set to -1.
URISyntaxException(java.lang.String input, java.lang.String msg, int index)
          Create an exception from the invalid string, with the index of the point of failure.
 
Method Summary
 int getIndex()
          Returns the index of the failure, or -1.
 java.lang.String getInput()
          Returns the bad input string.
 java.lang.String getMessage()
          Returns a message describing the parse error, as if by getReason() + (getIndex() >= 0 ? " at index " + getIndex() : "") + ": " + getInput().
 java.lang.String getReason()
          Returns the reason for the failure.
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Compatible with JDK 1.4+.

See Also:
Constant Field Values

input

private final java.lang.String input
The failed input.


index

private final int index
The index of failure.

Constructor Detail

URISyntaxException

public URISyntaxException(java.lang.String input,
                          java.lang.String msg)
Create an exception from the invalid string, with the index set to -1.


URISyntaxException

public URISyntaxException(java.lang.String input,
                          java.lang.String msg,
                          int index)
Create an exception from the invalid string, with the index of the point of failure.

Method Detail

getInput

public java.lang.String getInput()
Returns the bad input string.


getReason

public java.lang.String getReason()
Returns the reason for the failure.


getIndex

public int getIndex()
Returns the index of the failure, or -1.


getMessage

public java.lang.String getMessage()
Returns a message describing the parse error, as if by getReason() + (getIndex() >= 0 ? " at index " + getIndex() : "") + ": " + getInput().