Tabnine Logo
UriBuilder.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
de.schlichtherle.truezip.util.UriBuilder
constructor

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

origin: de.schlichtherle.truezip/truezip-path

private static URI fixChecked(final URI uri) {
  final String ssp = uri.getSchemeSpecificPart();
  final String a = uri.getAuthority();
  if (null == ssp // URI bug: null == new URI("foo").resolve(new URI("..")).getRawSchemeSpecificPart()
      || null == a && ssp.startsWith(SEPARATOR + SEPARATOR)) // empty authority
    return new UriBuilder(uri).toUri();
  return uri;
}
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-file

try {
  this.enclEntryName = new FsEntryName(
      new UriBuilder()
        .path(
          path.substring(iapl + 1) // cut off leading separatorChar
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-kernel

@Before
public void setUp() {
  builder = new UriBuilder();
}
origin: de.schlichtherle.truezip/truezip-path

p = cutTrailingSeparators(p, l);
try {
  final UriBuilder ub = new UriBuilder();
  if (0 < l) {
    if (SEPARATOR_CHAR != p.charAt(l - 1))
origin: de.schlichtherle.truezip/truezip-path

while ((mp = member.getPath()).startsWith(DOT_DOT_SEPARATOR)) {
  parent = parent(parent);
  member = new UriBuilder(member)
      .path(mp.substring(3))
      .getUri();
      : pu.getPath() + mp.substring(0, mpl);
  this.root = new FsPath(
      new UriBuilder()
        .scheme(pu.getScheme())
        .authority(ma)
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

@Override
public URI toUri() {
  URI n = getName();
  String s = n.getScheme();
  return new UriBuilder(getAddress().toHierarchicalUri())
      .scheme(null != s ? s : TFileSystemProvider.get(n).getScheme())
      .toUri();
}
origin: de.schlichtherle.truezip/truezip-path

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

  continue;
final FsEntryName entryName = new FsEntryName(
    new UriBuilder().path(cen).getUri());
assertEquals(cen, entryName.getPath());
assertEquals(cen, fileSystem.getEntry(entryName).getName());
de.schlichtherle.truezip.utilUriBuilder<init>

Popular methods of UriBuilder

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

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSharedPreferences (Context)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Socket (java.net)
    Provides a client-side TCP socket.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best plugins for Eclipse
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