Package org.eclipse.core.filesystem

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


    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

    } else if (input instanceof FileStoreEditorInput) {
      try {
        IFileStore fileStore = EFS
            .getStore(((FileStoreEditorInput) input).getURI());
        validationResult = MeiResourceReader
            .validateMEIInstance(fileStore.openInputStream(
                EFS.NONE, new NullProgressMonitor()));
        openNewEditorTab(fileStore.getName(), validationResult,
            fileStore.openInputStream(EFS.NONE,
                new NullProgressMonitor()));
      } catch (CoreException e) {
View Full Code Here

            .getStore(((FileStoreEditorInput) input).getURI());
        validationResult = MeiResourceReader
            .validateMEIInstance(fileStore.openInputStream(
                EFS.NONE, new NullProgressMonitor()));
        openNewEditorTab(fileStore.getName(), validationResult,
            fileStore.openInputStream(EFS.NONE,
                new NullProgressMonitor()));
      } catch (CoreException e) {
        LogService.error(e.getMessage(), e);
      }
    } else {
View Full Code Here

    InputStream is = null;
    JSONObject packageJSON = null;

    try {

      is = packageStore.openInputStream(EFS.NONE, null);
      packageJSON = new JSONObject(new JSONTokener(new InputStreamReader(is)));

      if (!packageJSON.has(NodeJSConstants.DEPENDENCIES))
        packageJSON.put(NodeJSConstants.DEPENDENCIES, new JSONObject());
View Full Code Here

        return new Plan(getId(), getWizardId(), TYPE, manifest);

      InputStream is = null;
      try {

        is = packageStore.openInputStream(EFS.NONE, null);
        JSONObject packageJSON = new JSONObject(new JSONTokener(new InputStreamReader(is)));
        if (packageJSON.has(NodeJSConstants.SCRIPTS)) {
          JSONObject scripts = packageJSON.getJSONObject(NodeJSConstants.SCRIPTS);
          if (scripts.has(NodeJSConstants.START)) {
            application.put(ManifestConstants.COMMAND, scripts.getString(NodeJSConstants.START));
View Full Code Here

    return localStore.getChild(dirName);
  }

  public InputStream getBlob(UniversalUniqueIdentifier uuid) throws CoreException {
    IFileStore blobFile = fileFor(uuid);
    return blobFile.openInputStream(EFS.NONE, null);
  }

  /**
   * Converts a byte array into a byte hash representation. It is used to
   * get a directory name.
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.