Examples of openInputStream()


Examples of org.apache.myfaces.trinidadinternal.share.io.InputStreamProvider.openInputStream()

    Object cached = provider.getCachedResult();
    if ((cached != null) && expectedType.isInstance(cached))
      return cached;

    TreeBuilder builder = new TreeBuilder(manager, expectedType);
    InputStream stream = provider.openInputStream();

    try
    {
      InputSource source = new InputSource(stream);
      source.setSystemId(sourceName);
View Full Code Here

Examples of org.apache.sling.ide.artifacts.EmbeddedArtifact.openInputStream()

          // then auto-install it if possible
          try {

                        InputStream contents = null;
                        try {
                            contents = toolingSupportBundle.openInputStream();
                            newOsgiClient().installBundle(contents, toolingSupportBundle.getName());
                        } finally {
                            IOUtils.closeQuietly(contents);
                        }
                        finalVersion = ourVersion;
View Full Code Here

Examples of org.apache.sling.ide.artifacts.EmbeddedArtifact.openInputStream()

        EmbeddedArtifact toolingBundle = locator.loadToolingSupportBundle();

        OsgiClientFactory clientFactory = Activator.getDefault().getOsgiClientFactory();
        OsgiClient osgiClient = clientFactory.createOsgiClient(new RepositoryInfo(config.getUsername(), config
                .getPassword(), config.getUrl()));
        osgiClient.installBundle(toolingBundle.openInputStream(), toolingBundle.getName());
    }
}
View Full Code Here

Examples of org.apache.sling.ide.artifacts.EmbeddedArtifact.openInputStream()

                    ISlingLaunchpadServer launchpadServer = (ISlingLaunchpadServer) getServer().loadAdapter(SlingLaunchpadServer.class,
                            monitor);
                    if (remoteVersion == null || remoteVersion.compareTo(embeddedVersion) < 0) {
                        InputStream contents = null;
                        try {
                            contents = supportBundle.openInputStream();
                            client.installBundle(contents, supportBundle.getName());
                        } finally {
                            IOUtils.closeQuietly(contents);
                        }
                        remoteVersion = embeddedVersion;
View Full Code Here

Examples of org.apache.sling.ide.artifacts.EmbeddedArtifact.openInputStream()

                                    message = "Bundle is already installed and up to date";
                                } else {
                                    monitor.setTaskName("Installing bundle");
                                    InputStream contents = null;
                                    try {
                                        contents = supportBundle.openInputStream();
                                        client.installBundle(contents, supportBundle.getName());
                                    } finally {
                                        IOUtils.closeQuietly(contents);
                                    }
                                    deployedVersion = embeddedVersion;
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.openInputStream()

    IFileStore fileStore= EFS.getLocalFileSystem().getStore(new Path(path));

    try {
      TemplateReaderWriter reader= new TemplateReaderWriter();
      if (fileStore.fetchInfo().exists()) {
        InputStream input= new BufferedInputStream(fileStore.openInputStream(EFS.NONE, null));
        try {
          TemplatePersistenceData[] datas= reader.read(input, null);
          for (int i= 0; i < datas.length; i++) {
            TemplatePersistenceData data= datas[i];
            fTemplateStore.add(data);
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.openInputStream()

    IContentType contentType= null;
    try {
      InputStream is = null;
      try {
        is = store.openInputStream(EFS.NONE, null);
        contentType= Platform.getContentTypeManager().findContentTypeFor(is, name);
      } finally {
        if (is != null) {
          is.close();
        }
View Full Code Here

Examples of org.eclipse.jgit.util.TemporaryBuffer.openInputStream()

          TemporaryBuffer buf = new TemporaryBuffer.LocalFile(10 * 1024 * 1024);
          try {
            fmt.formatMerge(buf, p, "BASE", oursName, theirsName, "UTF-8");
            buf.close();

            InputStream in = buf.openInputStream();
            try {
              resolved.put(path, ins.insert(Constants.OBJ_BLOB, buf.length(), in));
            } finally {
              in.close();
            }
View Full Code Here

Examples of org.osgi.service.io.ConnectorService.openInputStream()

        assertEquals("file://test.txt", connFactory.getName());
        assertEquals(ConnectorService.WRITE, connFactory.getMode());
        assertEquals(false, connFactory.isTimeout());
        assertNotNull("checks returned DataOutputStream", dataOutStream);

        InputStream inStream = service.openInputStream("file://test.txt");
        assertEquals("file://test.txt", connFactory.getName());
        assertEquals(ConnectorService.READ, connFactory.getMode());
        assertEquals(false, connFactory.isTimeout());
        assertNotNull("checks returned InputStream", inStream);
View Full Code Here

Examples of org.sf.bee.commons.localstore.BeeResource.openInputStream()

            final String targetFileName,
            final String secret) {
        try {
            final BeeResource res = new BeeResource(sourceFileName);
            if (res.exists()) {
                final InputStream is = res.openInputStream();
                try {
                    return this.encodeResource(
                            targetFileName,
                            is,
                            secret);
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.