public class HostFileNameParser extends AbstractFileNameParser
URLFileNameParser for the implementation which also handles the query string too| Modifier and Type | Class and Description |
|---|---|
protected static class |
HostFileNameParser.Authority
Parsed authority info (scheme, hostname, userinfo, port)
|
| Constructor and Description |
|---|
HostFileNameParser(int defaultPort) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
encodeCharacter(char ch)
Check if a character needs encoding (%nn).
|
protected String |
extractHostName(StringBuilder name)
Extracts the hostname from a URI.
|
protected int |
extractPort(StringBuilder name,
String uri)
Extracts the port from a URI.
|
protected HostFileNameParser.Authority |
extractToPath(String uri,
StringBuilder name)
Extracts the scheme, userinfo, hostname and port components of a
generic URI.
|
protected String |
extractUserInfo(StringBuilder name)
Extracts the user info from a URI.
|
int |
getDefaultPort() |
FileName |
parseUri(VfsComponentContext context,
FileName base,
String filename)
parses a String into a filename.
|
public int getDefaultPort()
public boolean encodeCharacter(char ch)
FileNameParserencodeCharacter in interface FileNameParserencodeCharacter in class AbstractFileNameParserch - the characterpublic FileName parseUri(VfsComponentContext context, FileName base, String filename) throws FileSystemException
FileNameParsercontext - The component context.base - The base FileName.filename - The target file name.FileSystemException - if an error occurs parsing the URI.protected HostFileNameParser.Authority extractToPath(String uri, StringBuilder name) throws FileSystemException
uri - The absolute URI to parse.name - Used to return the remainder of the URI.FileSystemExceptionprotected String extractUserInfo(StringBuilder name)
protected String extractHostName(StringBuilder name)
protected int extractPort(StringBuilder name, String uri) throws FileSystemException
FileSystemExceptionCopyright © 2002–2018 WSO2. All rights reserved.