Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.net

Class URISyntaxException

java.lang.Object
|
+--java.lang.Throwable
   |
   +--java.lang.Exception
      |
      +--java.net.URISyntaxException


public class URISyntaxException

extends Exception

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

Since:Author:See Also:

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

intgetIndex()

Returns the index of the failure, or -1.
java.lang.StringgetInput()

Returns the bad input string.
java.lang.StringgetMessage()

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

Returns the reason for the failure.

Constructor Details

URISyntaxException

public URISyntaxException(java.lang.String input, java.lang.String msg)

Create an exception from the invalid string, with the index set to -1.

Parameters:

Throws:


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.

Parameters:

Throws:


Method Details

getIndex

public int getIndex()

Returns the index of the failure, or -1.

Returns:


getInput

public String getInput()

Returns the bad input string.

Returns:


getMessage

public String getMessage()

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

Returns:


getReason

public String getReason()

Returns the reason for the failure.

Returns: