public class URIish
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
URIish()
Create an empty, non-configured URI.
|
URIish(java.lang.String s)
Parse and construct an
URIish from a string |
URIish(java.net.URL u)
Construct a URIish from a standard URL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getHost() |
java.lang.String |
getHumanishName()
Get the "humanish" part of the path.
|
java.lang.String |
getPass() |
java.lang.String |
getPath() |
int |
getPort() |
java.lang.String |
getRawPath() |
java.lang.String |
getScheme() |
java.lang.String |
getUser() |
int |
hashCode() |
boolean |
isRemote() |
URIish |
setHost(java.lang.String n)
Return a new URI matching this one, but with a different host.
|
URIish |
setPass(java.lang.String n)
Return a new URI matching this one, but with a different password.
|
URIish |
setPath(java.lang.String n)
Return a new URI matching this one, but with a different path.
|
URIish |
setPort(int n)
Return a new URI matching this one, but with a different port.
|
URIish |
setRawPath(java.lang.String n)
Return a new URI matching this one, but with a different (raw) path.
|
URIish |
setScheme(java.lang.String n)
Return a new URI matching this one, but with a different scheme.
|
URIish |
setUser(java.lang.String n)
Return a new URI matching this one, but with a different user.
|
java.lang.String |
toASCIIString() |
java.lang.String |
toPrivateASCIIString() |
java.lang.String |
toPrivateString()
Obtain the string form of the URI, with the password included.
|
java.lang.String |
toString() |
public URIish(java.lang.String s) throws java.net.URISyntaxException
URIish
from a strings
- java.net.URISyntaxException
public URIish(java.net.URL u)
u
- the source URL to convert from.public URIish()
public boolean isRemote()
public java.lang.String getHost()
public URIish setHost(java.lang.String n)
n
- the new value for host.public java.lang.String getScheme()
public URIish setScheme(java.lang.String n)
n
- the new value for scheme.public java.lang.String getPath()
public java.lang.String getRawPath()
public URIish setPath(java.lang.String n)
n
- the new value for path.public URIish setRawPath(java.lang.String n) throws java.net.URISyntaxException
n
- the new value for path.java.net.URISyntaxException
public java.lang.String getUser()
public URIish setUser(java.lang.String n)
n
- the new value for user.public java.lang.String getPass()
public URIish setPass(java.lang.String n)
n
- the new value for password.public int getPort()
public URIish setPort(int n)
n
- the new value for port.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toPrivateString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toASCIIString()
public java.lang.String toPrivateASCIIString()
public java.lang.String getHumanishName() throws java.lang.IllegalArgumentException
Path | Humanish part |
---|---|
/path/to/repo.git |
repo |
/path/to/repo.git/ |
|
/path/to/repo/.git |
|
/path/to/repo/ |
|
/path//to |
an empty string |
null
.java.lang.IllegalArgumentException
- if it's impossible to determine a humanish part, or path is
null
or emptygetPath()
Copyright © 2012. All Rights Reserved.