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

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

Best Java code snippets using org.apache.commons.vfs2.provider.HostFileNameParser$Authority.getUserName (Showing top 6 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

String username = auth.getUserName();
String domain = extractDomain(username);
if (domain != null)
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);
  }
}
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);
  }
}
org.apache.commons.vfs2.providerHostFileNameParser$AuthoritygetUserName

Javadoc

Get the user name.

Popular methods of HostFileNameParser$Authority

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

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • getSupportFragmentManager (FragmentActivity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top PhpStorm plugins
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