Tabnine Logo
HostFileNameParser$Authority.getPort
Code IndexAdd Tabnine to your IDE (free)

How to use
getPort
method
in
org.apache.commons.vfs2.provider.HostFileNameParser$Authority

Best Java code snippets using org.apache.commons.vfs2.provider.HostFileNameParser$Authority.getPort (Showing top 8 results out of 315)

origin: org.wso2.org.apache.commons/commons-vfs2-sandbox

@Override
public FileName parseUri(final VfsComponentContext context, final FileName base, final String filename)
    throws FileSystemException {
  final StringBuilder name = new StringBuilder();
  // Extract the scheme and authority parts
  final Authority auth = extractToPath(filename, name);
  // extract domain
  String username = auth.getUserName();
  final String domain = extractDomain(username);
  if (domain != null) {
    username = username.substring(domain.length() + 1);
  }
  // Decode and adjust separators
  UriParser.canonicalizePath(name, 0, name.length(), this);
  UriParser.fixSeparators(name);
  // Extract the share
  final String share = UriParser.extractFirstElement(name);
  if (share == null || share.length() == 0) {
    throw new FileSystemException("vfs.provider.smb/missing-share-name.error", filename);
  }
  // Normalise the path. Do this after extracting the share name,
  // to deal with things like smb://hostname/share/..
  final FileType fileType = UriParser.normalisePath(name);
  final String path = name.toString();
  return new SmbFileName(auth.getScheme(), auth.getHostName(), auth.getPort(), username, auth.getPassword(),
      domain, share, path, fileType);
}
origin: org.apache.commons/commons-vfs2-sandbox

auth.getScheme(),
auth.getHostName(),
auth.getPort(),
username,
auth.getPassword(),
origin: org.jetbrains.intellij.deps/commons-vfs2

  @Override
  public FileName parseChildUri(final VfsComponentContext context, final FileName base, final String filename)
      throws FileSystemException
  {
    // FTP URI are generic URI (as per RFC 2396)
    final StringBuilder name = new StringBuilder();

    // Extract the scheme and authority parts
    final Authority auth = extractToPath(filename, name);

    // Extract the queryString
    final String queryString = UriParser.extractQueryString(name);

    // Decode and normalise the file name
    UriParser.canonicalizePath(name, 0, name.length(), this);
    //UriParser.fixSeparators(name);
    final FileType fileType = UriParser.normalisePath(name);
    final String path = name.toString();

    return new URLFileName(
      auth.getScheme(),
      auth.getHostName(),
      auth.getPort(),
      getDefaultPort(),
      path,
      fileType,
      queryString);
  }
}
origin: org.jetbrains.intellij.deps/commons-vfs2

@Override
public FileName parseUri(final VfsComponentContext context, final FileName base, final String filename)
    throws FileSystemException
{
  // FTP URI are generic URI (as per RFC 2396)
  final StringBuilder name = new StringBuilder();
  // Extract the scheme and authority parts
  final Authority auth = extractToPath(filename, name);
  // Extract the queryString
  final String queryString = UriParser.extractQueryString(name);
  // Decode and normalise the file name
  UriParser.canonicalizePath(name, 0, name.length(), this);
  UriParser.fixSeparators(name);
  final FileType fileType = UriParser.normalisePath(name);
  final String path = name.toString();
  return new URLFileName(
    auth.getScheme(),
    auth.getHostName(),
    auth.getPort(),
    getDefaultPort(),
    path,
    fileType,
    queryString);
}
origin: apache/commons-vfs

  @Override
  public FileName parseUri(final VfsComponentContext context, final FileName base, final String filename)
      throws FileSystemException {
    // FTP URI are generic URI (as per RFC 2396)
    final StringBuilder name = new StringBuilder();

    // Extract the scheme and authority parts
    final Authority auth = extractToPath(filename, name);

    // Extract the queryString
    final String queryString = UriParser.extractQueryString(name);

    // Decode and normalise the file name
    UriParser.canonicalizePath(name, 0, name.length(), this);
    UriParser.fixSeparators(name);
    final FileType fileType = UriParser.normalisePath(name);
    final String path = name.toString();

    return new URLFileName(auth.getScheme(), auth.getHostName(), auth.getPort(), getDefaultPort(),
        auth.getUserName(), auth.getPassword(), path, fileType, queryString);
  }
}
origin: org.apache.commons/commons-vfs2

  @Override
  public FileName parseUri(final VfsComponentContext context, final FileName base, final String filename)
      throws FileSystemException {
    // FTP URI are generic URI (as per RFC 2396)
    final StringBuilder name = new StringBuilder();

    // Extract the scheme and authority parts
    final Authority auth = extractToPath(filename, name);

    // Extract the queryString
    final String queryString = UriParser.extractQueryString(name);

    // Decode and normalise the file name
    UriParser.canonicalizePath(name, 0, name.length(), this);
    UriParser.fixSeparators(name);
    final FileType fileType = UriParser.normalisePath(name);
    final String path = name.toString();

    return new URLFileName(auth.getScheme(), auth.getHostName(), auth.getPort(), getDefaultPort(),
        auth.getUserName(), auth.getPassword(), path, fileType, queryString);
  }
}
origin: apache/commons-vfs

  @Override
  public FileName parseUri(final VfsComponentContext context, final FileName base, final String filename)
      throws FileSystemException {
    // FTP URI are generic URI (as per RFC 2396)
    final StringBuilder name = new StringBuilder();

    // Extract the scheme and authority parts
    final Authority auth = extractToPath(filename, name);

    // Extract the queryString
    final String queryString = UriParser.extractQueryString(name);

    // Decode and normalise the file name
    UriParser.canonicalizePath(name, 0, name.length(), this);
    UriParser.fixSeparators(name);
    final FileType fileType = UriParser.normalisePath(name);
    final String path = name.toString();

    return new GenericURLFileName(auth.getScheme(), auth.getHostName(), auth.getPort(), getDefaultPort(),
        auth.getUserName(), auth.getPassword(), path, fileType, queryString);
  }
}
origin: com.github.abashev/commons-vfs2

  @Override
  public FileName parseUri(final VfsComponentContext context, final FileName base, final String filename)
      throws FileSystemException {
    // FTP URI are generic URI (as per RFC 2396)
    final StringBuilder name = new StringBuilder();

    // Extract the scheme and authority parts
    final Authority auth = extractToPath(filename, name);

    // Extract the queryString
    final String queryString = UriParser.extractQueryString(name);

    // Decode and normalise the file name
    UriParser.canonicalizePath(name, 0, name.length(), this);
    UriParser.fixSeparators(name);
    final FileType fileType = UriParser.normalisePath(name);
    final String path = name.toString();

    return new URLFileName(auth.getScheme(), auth.getHostName(), auth.getPort(), getDefaultPort(),
        auth.getUserName(), auth.getPassword(), path, fileType, queryString);
  }
}
org.apache.commons.vfs2.providerHostFileNameParser$AuthoritygetPort

Javadoc

Get the port.

Popular methods of HostFileNameParser$Authority

  • getHostName
    Get the host name.
  • getScheme
    Get the connection schema.
  • getPassword
    Get the user password.
  • getUserName
    Get the user name.
  • <init>

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now