Examples of createFile()


Examples of org.gephi.utils.TempDirUtils.TempDir.createFile()

    public static String renderChart(JFreeChart chart, String fileName) {
        String imageFile = "";
        try {
            final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
            TempDir tempDir = TempDirUtils.createTempDir();
            File file1 = tempDir.createFile(fileName);
            imageFile = "<IMG SRC=\"file:" + file1.getAbsolutePath() + "\" " + "WIDTH=\"600\" HEIGHT=\"400\" BORDER=\"0\" USEMAP=\"#chart\"></IMG>";
            ChartUtilities.saveChartAsPNG(file1, chart, 600, 400, info);
        } catch (IOException e) {
            System.out.println(e.toString());
        }
View Full Code Here

Examples of org.jboss.fresh.vfs.VFS.createFile()

      if (vfs.exists(shell.getUserCtx(), path.getPath(), true)) {

        if (!vfs.exists(shell.getUserCtx(), path, true)) {
          FileInfo dir = new FileInfo(path, FileInfo.TYPE_DIR);
          vfs.createFile(shell.getUserCtx(), dir);
          //out.println(param+ ": Directory successfully created.");

        } else {
          if (canThrowEx()) {
            throw new RuntimeException(param + ": Path already exists!");
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.NFS2Client.createFile()

    public FSEntry addFile(String name) throws IOException {
        NFS2Client nfsClient = getNFS2Client();

        CreateFileResult result;
        try {
            result = nfsClient.createFile(directoryEntry.getFileHandle(), name, DEFAULT_PERMISSION,
                -1, -1, -1, new Time(-1, -1), new Time(-1, -1));
        } catch (NFS2Exception e) {
            throw new IOException("Can not create the file " + name + "." + e.getMessage(), e);
        }
View Full Code Here

Examples of org.netbeans.gradle.model.util.TemporaryFileManager.createFile()

        ModelQueryInput modelInput = new ModelQueryInput(projectInfoBuilders.getSerializableBuilderMap());
        TemporaryFileRef modelInputFile = fileManager.createFileFromSerialized(modelInputPrefix, modelInput);
        try {
            initScript = initScript.replace("$INPUT_FILE", toPastableString(modelInputFile.getFile()));

            TemporaryFileRef initScriptRef = fileManager
                    .createFile(initScriptPrefix, initScript, INIT_SCRIPT_ENCODING);
            try {
                String[] executerArgs = new String[userArgs.length + 2];
                System.arraycopy(userArgs, 0, executerArgs, 0, userArgs.length);
View Full Code Here

Examples of org.nutz.filepool.FilePool.createFile()

              br.skipMark();
            } while (mm == MarkMode.NOT_FOUND);
          }
          // 保存临时文件
          else {
            File tmp = tmps.createFile(meta.getFileExtension());
            OutputStream ops = null;
            try {
              ops = new BufferedOutputStreamnew FileOutputStream(tmp),
                              bufferSize * 2);
              // 需要限制文件大小
View Full Code Here

Examples of org.nxplanner.file.FileSystem.createFile()

                    projectId = new Integer(0);
                }
                int filesize = rs.getInt("file_size");
                final FileSystem fileSystem = new FileSystemImpl();
                Directory directory = fileSystem.getDirectory("/attachments/project/"+projectId);
                File file = fileSystem.createFile(directory, rs.getString("filename"), rs.getString("content_type"),
                        filesize, rs.getBlob("file").getBinaryStream());
                note.setFile(file);
            }
            session.flush();
            session.connection().commit();
View Full Code Here

Examples of org.nxplanner.file.FileSystemImpl.createFile()

                    projectId = new Integer(0);
                }
                int filesize = rs.getInt("file_size");
                final FileSystem fileSystem = new FileSystemImpl();
                Directory directory = fileSystem.getDirectory("/attachments/project/"+projectId);
                File file = fileSystem.createFile(directory, rs.getString("filename"), rs.getString("content_type"),
                        filesize, rs.getBlob("file").getBinaryStream());
                note.setFile(file);
            }
            session.flush();
            session.connection().commit();
View Full Code Here

Examples of org.openqreg.reader.XmlCreator.createFile()

            String targetlang = req.getParameter("targetlang");
            creator = new XliffCreator(sourcelang, targetlang);
          } else {
            creator = new XmlTextCreator();
          }
          Document doc = creator.createFile(DbHandler.getConnection(),
              xmlDocName);
         
          //Write the xml/html document nicely
          OutputFormat format = OutputFormat.createPrettyPrint();
          format.setEncoding("UTF-8");
View Full Code Here

Examples of org.rhq.helpers.pluginGen.PluginGen.createFile()

      cache.setCategory(ResourceCategory.SERVICE);
      populateMetricsAndOperations(namedCacheClasses, cache, true);
     
      root.getChildren().add(cache);
        
      pg.createFile(root, "descriptor", "rhq-plugin.xml", "../../../src/main/resources/META-INF");
      copyFile(new File("../../../src/main/resources/META-INF/rhq-plugin.xml"), new File("../../../target/classes/META-INF/rhq-plugin.xml"));
     
      return true;
   }
  
View Full Code Here

Examples of org.sd_network.vfs.VfsService.createFile()

        String fileName = commandLine.getArgs()[0];
        String parentFileID = session.getCurrentDirectory().getID();

        try {
            vfsService.createFile(sessionID, parentFileID, fileName);
        } catch (SessionException e) {
            session.clearSessionID();
            throw new IllegalStateException("ERROR: session time out.");
        } catch (VfsIOException e) {
            System.out.println("ERROR: " + e.getMessage());
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.