congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HostFileNameParser$Authority
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.apache.commons.vfs2.provider.HostFileNameParser$Authority (Showing top 12 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.jetbrains.intellij.deps/commons-vfs2

throws FileSystemException
final Authority auth = new Authority();
origin: apache/commons-vfs

final Authority auth = new Authority();
origin: com.github.abashev/commons-vfs2

final Authority auth = new Authority();
origin: org.apache.commons/commons-vfs2

final Authority auth = new Authority();
origin: org.apache.commons/commons-vfs2-sandbox

String username = auth.getUserName();
String domain = extractDomain(username);
if (domain != null)
  auth.getScheme(),
  auth.getHostName(),
  auth.getPort(),
  username,
  auth.getPassword(),
  domain,
  share,
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$Authority

Javadoc

Parsed authority info (scheme, hostname, username/password, port).

Most used methods

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • JTextField (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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