Examples of openResource()


Examples of anvil.server.Address.openResource()

    } catch (anvil.server.ZoneInactiveException e) {
      throw context.ImportError(e.getMessage(), null);
    }
    context.checkImport(importing.getPathinfo());
    try {
      Resource resource = importing.openResource();
      return new AnyResource(resource);
    } catch (anvil.server.ContainerException t) {
      throw context.ImportError(t.getMessage(), null);
    }
  }
View Full Code Here

Examples of com.asakusafw.compiler.batch.ResourceRepository.Cursor.openResource()

                if (saw.contains(location)) {
                    LOG.warn("{} is already added to JAR", location);
                    continue;
                }
                saw.add(location);
                addEntry(jar, cursor.openResource(), location);
            }
        } finally {
            cursor.close();
        }
    }
View Full Code Here

Examples of com.asakusafw.dmdl.source.DmdlSourceRepository.Cursor.openResource()

        Cursor cursor = source.createCursor();
        try {
            while (cursor.next()) {
                URI name = cursor.getIdentifier();
                LOG.info(Messages.getString("AnalyzeTask.monitorParseStarting"), name); //$NON-NLS-1$
                Reader resource = cursor.openResource();
                try {
                    AstScript script = parser.parse(resource, name);
                    for (AstModelDefinition<?> model : script.models) {
                        LOG.debug(Messages.getString("AnalyzeTask.monitorFoundModel"), model.name); //$NON-NLS-1$
                        analyzer.addModel(model);
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.ICodeBaseEntry.openResource()

            data = ((ZipInputStreamCodeBaseEntry) codeBaseEntry).getBytes();
        } else {
            try {
                // Create a ByteArrayOutputStream to capture the class data
                int length = codeBaseEntry.getNumBytes();
                InputStream in = codeBaseEntry.openResource();
                if (length >= 0) {
                    data = IO.readAll(in, length);
                } else {
                    data = IO.readAll(in);
                }
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.ICodeBaseEntry.openResource()

            // interruptible
            ICodeBaseEntry resource = parentCodeBase.lookupResource(resourceName);
            if (resource == null) {
                throw new ResourceNotFoundException(resourceName);
            }
            inputStream = resource.openResource();
            outputStream = new BufferedOutputStream(new FileOutputStream(tempFile));
            IO.copy(inputStream, outputStream);
            outputStream.flush();

            // Create the delegate to read from the temporary file
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.ICodeBaseEntry.openResource()

        }

        // Try to read the manifest
        InputStream in = null;
        try {
            in = manifestEntry.openResource();
            Manifest manifest = new Manifest(in);

            Attributes mainAttrs = manifest.getMainAttributes();
            String classPath = mainAttrs.getValue("Class-Path");
            if (classPath != null) {
View Full Code Here

Examples of edu.umd.cs.findbugs.classfile.ICodeBaseEntry.openResource()

        try {
            // Open and parse the class file to attempt
            // to discover the source file name.
            ICodeBaseEntry codeBaseEntry = classPath.lookupResource(classDesc.toResourceName());

            ClassParserUsingASM classParser = new ClassParserUsingASM(new ClassReader(codeBaseEntry.openResource()), classDesc,
                    codeBaseEntry);

            ClassInfo.Builder classInfoBuilder = new ClassInfo.Builder();
            classParser.parse(classInfoBuilder);
            ClassInfo classInfo = classInfoBuilder.build();
View Full Code Here

Examples of org.apache.solr.common.ResourceLoader.openResource()

        final SolrCore core = context.getSolrCore();
        final StreamSource xsltSource;
        if (core != null) {
          final ResourceLoader loader = core.getResourceLoader();
          transFact.setURIResolver(new SystemIdResolver(loader).asURIResolver());
          xsltSource = new StreamSource(loader.openResource(xslt),
            SystemIdResolver.createSystemIdFromResourceName(xslt));
        } else {
          // fallback for tests
          xsltSource = new StreamSource(xslt);
        }
View Full Code Here

Examples of org.apache.solr.core.SolrResourceLoader.openResource()

    SolrResourceLoader loader = new SolrResourceLoader(null, null);
    File f = new File(confDir, "solrconfig.xml");
    String fname = "solr/conf/solrconfig-slave1.xml";
    FileOutputStream out = new FileOutputStream(f);
    IOUtils.copy(loader.openResource(fname), out);
    out.close();
    f = new File(confDir, "schema.xml");
    fname = "solr/conf/schema-binaryfield.xml";
    out = new FileOutputStream(f);
    IOUtils.copy(loader.openResource(fname), out);
View Full Code Here

Examples of org.apache.solr.core.SolrResourceLoader.openResource()

    IOUtils.copy(loader.openResource(fname), out);
    out.close();
    f = new File(confDir, "schema.xml");
    fname = "solr/conf/schema-binaryfield.xml";
    out = new FileOutputStream(f);
    IOUtils.copy(loader.openResource(fname), out);
    out.close();
    System.setProperty("solr.solr.home", homeDir.getAbsolutePath());
    System.setProperty("solr.data.dir", dataDir.getAbsolutePath());
    System.setProperty("solr.test.sys.prop1", "propone");
    System.setProperty("solr.test.sys.prop2", "proptwo");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.