public class GenericFileName extends AbstractFileName
ROOT_PATH, SEPARATOR, SEPARATOR_CHAR| Modifier | Constructor and Description |
|---|---|
protected |
GenericFileName(String scheme,
String hostName,
int port,
int defaultPort,
String userName,
String password,
String path,
FileType type) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendCredentials(StringBuilder buffer,
boolean addPassword)
Append the user credentials.
|
protected void |
appendRootUri(StringBuilder buffer,
boolean addPassword)
Builds the root URI for this file name.
|
FileName |
createName(String absPath,
FileType type)
Create a FileName.
|
int |
getDefaultPort()
Returns the default port for this file name.
|
String |
getHostName()
Returns the host name part of this name.
|
String |
getPassword()
Returns the password part of this name.
|
int |
getPort()
Returns the port part of this name.
|
String |
getUserName()
Returns the user name part of this name.
|
checkName, compareTo, createURI, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getType, getURI, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, isFile, toStringpublic String getUserName()
public String getPassword()
public String getHostName()
public int getPort()
public int getDefaultPort()
public FileName createName(String absPath, FileType type)
createName in class AbstractFileNameabsPath - The absolute path.type - The FileType.protected void appendRootUri(StringBuilder buffer, boolean addPassword)
appendRootUri in class AbstractFileNamebuffer - A StringBuilder to use to construct the URI.addPassword - true if the password should be added, false otherwise.protected void appendCredentials(StringBuilder buffer, boolean addPassword)
If anything was added, it will be '@' terminated.
buffer - the string buffer to modify.addPassword - flag if password should be added or replaced with placeholder (false).Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.