Package net.sourceforge.javautil.common.io.impl

Examples of net.sourceforge.javautil.common.io.impl.SimplePath


    return new SimplePath( CollectionUtil.push(reference.getGroupId().split("\\."),
      reference.getArtifactId(), reference.getVersion().toVersionString()) );
  }

  public IVirtualPath createArtifactPath(IClassArtifactReference reference) {
    return new SimplePath( CollectionUtil.push(reference.getGroupId().split("\\."), reference.getArtifactId() ));
  }
View Full Code Here


  /**
   * @param repositoryName The repository name
   * @return True if the repository exists, otherwise false
   */
  public static boolean isExistsRepository (String repositoryName) {
    return VirtualArtifactSystem.get(MEMORY_REPOSITORY_VAS, true).isExists(new SimplePath(repositoryName));
  }
View Full Code Here

   * @param repositoryName The repository name
   * @param name The name of the jar
   * @return True if the jar exists in the specified repository, otherwise false
   */
  public static boolean isExistsJar (String repositoryName, String name) {
    return VirtualArtifactSystem.get(MEMORY_REPOSITORY_VAS, true).isExists(new SimplePath(repositoryName + "/" + name));
  }
View Full Code Here

      ZipEntry entry = null;
      do {
        entry = input.getNextEntry();
        if (entry != null) {
          if (entry.getName().endsWith("/")) {
            directory.createDirectory(new SimplePath(entry.getName()));
          } else
            directory.createFile(new SimplePath(entry.getName()), IOUtil.read(input, null, false));
        }
      } while (entry != null);
    } catch (IOException e) {
      throw ThrowableManagerRegistry.caught(e);
    } finally {
View Full Code Here

    return this.hasParentPackage(info.getPackageName());
  }

  @Override public boolean hasParentPackage(String packageName) {
    try {
      return directory.getArtifact(new SimplePath(packageName, "\\.")) instanceof IVirtualDirectory;
    } catch (VirtualArtifactNotFoundException e) {
      return false;
    }
  }
View Full Code Here

 
  private IVirtualArtifact getPathedArtifact (String path) { return directory.getArtifact(this.getPath(path)); }
 
  private IVirtualArtifact getArtifact (ClassSearchInfo info) { return directory.getArtifact(this.getPath(info.getClassPath())); }
 
  private IVirtualPath getPath (String path) { return new SimplePath(path, pathSeparator); }
View Full Code Here

 
  @Override public URL getResource(String resourceName) {
    URL url = super.getResource(resourceName);
    if (url == null) {
      try {
        url = libDirectory.getArtifact(new SimplePath(resourceName)).getURL();
      } catch (VirtualArtifactNotFoundException e) {
        return null;
      }
    }
    return url;
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.common.io.impl.SimplePath

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.