Tabnine Logo
UriBuilder.path
Code IndexAdd Tabnine to your IDE (free)

How to use
path
method
in
de.schlichtherle.truezip.util.UriBuilder

Best Java code snippets using de.schlichtherle.truezip.util.UriBuilder.path (Showing top 11 results out of 315)

origin: de.schlichtherle.truezip/truezip-path

@edu.umd.cs.findbugs.annotations.SuppressWarnings("ES_COMPARING_STRINGS_WITH_EQ")
private static URI name(URI uri) {
  try {
    uri = checkFix(uri);
    final int pl = pathPrefixLength(uri);
    final String q = uri.getPath();
    final String p = cutTrailingSeparators(q, pl);
    if (p != q) // mind contract of cutTrailingSeparators(String, int)
      return new UriBuilder(uri).path(p).getUri();
    return uri;
  } catch (URISyntaxException ex) {
    throw new IllegalArgumentException(ex);
  }
}
origin: de.schlichtherle.truezip/truezip-file

/**
 * Initialize this file object by scanning its path for archive
 * files, using the given {@code ancestor} file (i.e. a direct or
 * indirect parent file) if any.
 * {@code file} and {@code detector} must already be initialized!
 * Must not be called to re-initialize this object!
 */
private void scan(final @CheckForNull TFile ancestor) {
  final String path = super.getPath();
  assert ancestor == null || path.startsWith(ancestor.getPath());
  assert file.getPath().equals(path);
  assert null != detector;
  final StringBuilder enclEntryNameBuf = new StringBuilder(path.length());
  scan(ancestor, detector, 0, path, enclEntryNameBuf, new Splitter(separatorChar, false));
  try {
    enclEntryName = 0 >= enclEntryNameBuf.length()
        ? null
        : new FsEntryName(
          new UriBuilder().path(enclEntryNameBuf.toString()).getUri(),
          CANONICALIZE);
  } catch (URISyntaxException ex) {
    throw new AssertionError(ex);
  }
}
origin: de.schlichtherle.truezip/truezip-path

  return ub.path(p).getUri();
} catch (URISyntaxException ex) {
  throw new IllegalArgumentException(ex);
origin: de.schlichtherle.truezip/truezip-file

this.enclEntryName = new FsEntryName(
    new UriBuilder()
      .path(
        path.substring(iapl + 1) // cut off leading separatorChar
          .replace(separatorChar, SEPARATOR_CHAR))
origin: de.schlichtherle.truezip/truezip-path

parent = parent(parent);
member = new UriBuilder(member)
    .path(mp.substring(3))
    .getUri();
      .scheme(pu.getScheme())
      .authority(ma)
      .path(p)
      .getUri());
mp = mp.substring(mpl);
origin: de.schlichtherle.truezip/truezip-path

private TPath resolve(final URI m) {
  URI n;
  final String np;
  if (TPathScanner.isAbsolute(m) || (n = getName()).toString().isEmpty()) {
    n = m;
  } else if (m.toString().isEmpty()) {
    n = getName();
  } else if ((np = n.getPath()).endsWith(SEPARATOR)) {
    n = n.resolve(m);
  } else {
    try {
      n = new UriBuilder(n).path(np + SEPARATOR_CHAR).getUri().resolve(m);
    } catch (URISyntaxException ex) {
      throw new AssertionError(ex);
    }
  }
  final TArchiveDetector d = getDefaultArchiveDetector();
  final FsPath p = new TPathScanner(d).scan(
      TPathScanner.isAbsolute(m)
        ? TFileSystemProvider.get(getName()).getRoot()
        : getAddress(),
      m);
  return new TPath(n, d, p);
}
origin: de.schlichtherle.truezip/truezip-path

if (null != ps) {
  men = new FsEntryName(
      uri.path(splitter.getMemberName()).getUri(),
      NULL);
  pp = scan(ps);
} else {
  men = new FsEntryName(
      uri.path(path).query(memberQuery).getUri(),
      CANONICALIZE);
  pp = root;
  final String pup = ppu.getPath();
  if (!pup.endsWith(SEPARATOR))
    ppu = new UriBuilder(ppu).path(pup + SEPARATOR_CHAR).getUri();
  mp = new FsPath(new FsMountPoint(ppu), men);
origin: de.schlichtherle.truezip/truezip-kernel

@Test
public void testClear2() {
  builder .uri(URI.create("scheme://authority/path?query#fragment"))
      .scheme(null)
      .authority(null)
      .path(null)
      .query(null)
      .fragment(null);
  testDefaults();
}
origin: de.schlichtherle.truezip/truezip-kernel

.scheme(test[0])
.authority(test[1])
.path(test[2])
.query(test[3])
.fragment(test[4]);
origin: de.schlichtherle.truezip/truezip-kernel

  continue;
final FsEntryName entryName = new FsEntryName(
    new UriBuilder().path(cen).getUri());
assertEquals(cen, entryName.getPath());
assertEquals(cen, fileSystem.getEntry(entryName).getName());
origin: de.schlichtherle.truezip/truezip-kernel

.scheme(test[1])
.authority(test[2])
.path(test[3])
.query(test[4])
.fragment(test[5]);
de.schlichtherle.truezip.utilUriBuilderpath

Popular methods of UriBuilder

  • <init>
  • getUri
  • authority
  • query
  • scheme
  • toUri
  • clear
  • fragment
  • getAuthority
  • getFragment
  • getPath
  • getQuery
  • getPath,
  • getQuery,
  • getScheme,
  • getString,
  • setAuthority,
  • setUri,
  • toString,
  • uri

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
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