public class URIish extends Object implements Serializable
Constructor and Description |
---|
URIish()
Create an empty, non-configured URI.
|
URIish(String s)
Parse and construct an
URIish from a
string |
URIish(URL u)
Construct a URIish from a standard URL.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getHost()
Get host name part.
|
String |
getHumanishName()
Get the "humanish" part of the path.
|
String |
getPass()
Get password requested for transfer
|
String |
getPath()
Get path name component
|
int |
getPort()
Get port number requested for transfer or -1 if not explicit
|
String |
getRawPath()
Get path name component
|
String |
getScheme()
Get protocol name
|
String |
getUser()
Get user name requested for transfer
|
int |
hashCode() |
boolean |
isRemote()
Whether this URI references a repository on another system.
|
URIish |
setHost(String n)
Return a new URI matching this one, but with a different host.
|
URIish |
setPass(String n)
Return a new URI matching this one, but with a different password.
|
URIish |
setPath(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(String n)
Return a new URI matching this one, but with a different (raw) path.
|
URIish |
setScheme(String n)
Return a new URI matching this one, but with a different scheme.
|
URIish |
setUser(String n)
Return a new URI matching this one, but with a different user.
|
String |
toASCIIString()
Get the URI as an ASCII string.
|
String |
toPrivateASCIIString()
Convert the URI including password, formatted with only ASCII characters
such that it will be valid for use over the network.
|
String |
toPrivateString()
Obtain the string form of the URI, with the password included.
|
String |
toString() |
public URIish(String s) throws URISyntaxException
URIish
from a
strings
- a String
object.URISyntaxException
public URIish(URL u)
u
- the source URL to convert from.public URIish()
public boolean isRemote()
public String getHost()
public URIish setHost(String n)
n
- the new value for host.public String getScheme()
public URIish setScheme(String n)
n
- the new value for scheme.public String getPath()
public String getRawPath()
public URIish setPath(String n)
n
- the new value for path.public URIish setRawPath(String n) throws URISyntaxException
n
- the new value for path.URISyntaxException
public String getUser()
public URIish setUser(String n)
n
- the new value for user.public String getPass()
public URIish setPass(String n)
n
- the new value for password.public int getPort()
public URIish setPort(int n)
n
- the new value for port.public String toPrivateString()
public String toASCIIString()
public String toPrivateASCIIString()
public String getHumanishName() throws IllegalArgumentException
Path | Humanish part |
---|---|
/path/to/repo.git |
repo |
/path/to/repo.git/ |
|
/path/to/repo/.git |
|
/path/to/repo/ |
|
localhost |
ssh://localhost/ |
/path//to |
an empty string |
null
.IllegalArgumentException
- if it's impossible to determine a humanish part, or path is
null
or emptygetPath()
Copyright © 2019 Eclipse JGit Project. All rights reserved.