Package org.xmlvm.util.universalfile

Examples of org.xmlvm.util.universalfile.UniversalFile


    return true;
  }

  private void preloadGreenlistFiles(String greenlistFile, Map<String, XmlvmResource> resources)
  {
    UniversalFile greenList= UniversalFileCreator.createFile(new File(greenlistFile));
    LibraryLoader libraryLoader= new LibraryLoader(arguments);
    UniversalFile defaultGreenList= UniversalFileCreator.createFile("/lib/greenlist.txt", "lib/greenlist.txt");
    for (UniversalFile file : new UniversalFile[] { greenList, defaultGreenList })
    {
      Set<String> classes= ClassListLoader.loadGreenlist(file);
      if (classes != null)
      { // If any green list exists, force inclusion of its contents
View Full Code Here


   * destination. If the destination doesn't exist, this method returns
   * <code>true</code>.
   */
  public boolean isDifferentFromExisting()
  {
    UniversalFile destination= UniversalFileCreator.createFile(new File(getFullPath()));
    if (!destination.exists() || !destination.isFile())
    {
      return true;
    }

    maybeLoadDelayedData();
View Full Code Here

    internalDataFiles= new ArrayList<UniversalFile>();
    for (String resource : resources)
    {
      String dataInJarResource= INTERNAL_DATAFILE_JAR_LOCATION.replace("__PLATFORM__", platform) + resource;
      String dataPath= INTERNAL_DATAFILE_LOCATION.replace("__PLATFORM__", platform) + resource;
      UniversalFile resourceFile= UniversalFileCreator.createFile(dataInJarResource, dataPath);
      if (resourceFile != null && resourceFile.exists())
      {
        internalDataFiles.add(resourceFile);
      }
    }
  }
View Full Code Here

          processes.add(createInputProcess(file));
        }
      }
      else
      {
        UniversalFile file= UniversalFileCreator.createFile(new File(inputElement));
        if (file != null)
        {
          processes.add(createInputProcess(file));
        }
        else
View Full Code Here

    return false;
  }

  protected UniversalFile[] getLibraryUncached()
  {
    UniversalFile result= UniversalFileCreator.createDirectory(ONE_JAR_LOCATION, prepareTempJar(FILE_SYSTEM_LOCATION, ""));
    return new UniversalFile[] { result };
  }
View Full Code Here

    return false;
  }

  protected UniversalFile[] getLibraryUncached()
  {
    UniversalFile result= UniversalFileCreator.createDirectory(ONE_JAR_LOCATION, prepareTempJar(FILE_SYSTEM_LOCATION, ""));
    return new UniversalFile[] { result };
  }
View Full Code Here

    {
      Log.error(TAG, "Could not find additional library at: " + locationStr);
      return false;
    }

    UniversalFile file= UniversalFileCreator.createDirectory(location.getAbsolutePath());
    libraries.add(0, new AdditionalLibrary(file));
    return true;
  }
View Full Code Here

    return true;
  }

  protected UniversalFile[] getLibraryUncached()
  {
    UniversalFile android= UniversalFileCreator.createDirectory(ONE_JAR_LOCATION, prepareTempJar(FILE_SYSTEM_LOCATION, ""));
    UniversalFile common= UniversalFileCreator.createDirectory(ONE_JAR_LOCATION, prepareTempJar(COMMON_FILE_SYSTEM_LOCATION, ""));
    UniversalFile wp7= UniversalFileCreator.createDirectory(ONE_JAR_LOCATION, prepareTempJar(WP7_FILE_SYSTEM_LOCATION, ""));
    return new UniversalFile[] { android, common, wp7 };
  }
View Full Code Here

   *         path was not found.
   */
  protected String prepareTempJar(String path, String pathPrefix)
  {

    UniversalFile source= UniversalFileCreator.createDirectory(path);
    if (source == null || !source.exists())
    {
      Log.debug(TAG, "Couldn't find library path: " + path);
      return null;
    }
    long lastModified= lastModifiedRecursive(source);
    String tempFileName= createTempFileName(path, lastModified);

    // Check whether the temp jar already exists with the given time stamp.
    if (exists(tempFileName))
    {
      return tempFileName;
    }

    Log.debug(TAG, "Preparing temp JAR for '" + path + "' at '" + tempFileName + "'.");
    source.archiveTo(tempFileName, pathPrefix);
    return tempFileName;
  }
View Full Code Here

  {
    if (directory != null)
      if (typeName.contains("."))
      {
        String packageName= typeName.substring(0, typeName.indexOf("."));
        UniversalFile subDir;
        subDir= directory.getEntry(packageName);
        if (subDir != null && subDir.isDirectory())
        {
          return load(typeName.substring(typeName.indexOf(".") + 1), subDir);
        }
        else
        {
          return null;
        }
      }
      else
      {
        UniversalFile classFile;
        classFile= directory.getEntry(typeName + ".class");
        if (classFile != null && classFile.isFile())
        {

          // Success, we found the class file we were looking for.
          // Let's
          // process it.
View Full Code Here

TOP

Related Classes of org.xmlvm.util.universalfile.UniversalFile

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.