Examples of saveFile()


Examples of domain.FileControllerDomain.saveFile()

    }

    public void save(JTextArea text) {
    FileControllerDomain fCntrl = new FileControllerDomain();
    try {
      fCntrl.saveFile(text);
    }
    catch(Exception e) {
    }
    }
View Full Code Here

Examples of edu.gmu.seor.prognos.simulation.integration.gui.FileChooserDialog.saveFile()

   */
  private JButton createSaveWorldButton() {
    acSaveWorld = new AbstractAction("Save World") {
      public void actionPerformed(ActionEvent e) {
        FileChooserDialog ufd = new FileChooserDialog();
        String strfile =  ufd.saveFile(new Frame(), "Open...", ".\\", "*.tdb");
       
        int i = strfile.indexOf(".tdb");
        if(i < 1)
          return;
        strfile = strfile.substring(0, i);
View Full Code Here

Examples of evolaris.framework.blog.business.FCKEditorManager.saveFile()

            retVal="201";
            counter++;
          }
          byte[] fileData = uplFile.get();
          if (fileData != null && fileData.length > 0) {  // this also happens if the file does not exist => no precise error message possible
            fckMgr.saveFile(blogCode, currentDir, fileName, fileData, uplFile.getContentType(), user);
          }         
        } catch (Exception ex) {
          retVal="203";
        }
       
View Full Code Here

Examples of evolaris.framework.blog.business.FCKEditorManager.saveFile()

            retVal="201";
            counter++;
          }
          byte[] fileData = uplFile.get();
          if (fileData != null && fileData.length > 0) {  // this also happens if the file does not exist => no precise error message possible
            fckMgr.saveFile(blogCode, currentDir, fileName, fileData, uplFile.getContentType(), user);
          }                   
        } else {
          retVal="202";
          errorMessage="";
          LOGGER.debug("Invalid file type: " + ext)
View Full Code Here

Examples of javax.mail.internet.MimeBodyPart.saveFile()

                    }
                    attachments.appendChild(attachment);
                    logger.finer(String.format("Writing attachment file %s...",p.getFileName()));
                    attachmentFolder.mkdir()// Does nothing if it already exists
                    try {
                        p.saveFile(new File(attachmentFolder, p.getFileName()));
                    } catch (IOException ex) {
                        logger.log(Level.WARNING, "Error decoding attachment; file may be corrupt!", ex);
                    }
                    attachmentFileNames.add(attachmentFolder.getCanonicalPath() + "/" + p.getFileName());
                    validAttachments = true;
View Full Code Here

Examples of net.sourceforge.pebble.domain.FileManager.saveFile()

  public void testViewFiles() throws Exception {
    // create some files and directories
    FileManager fileManager = new FileManager(blog, FileMetaData.BLOG_FILE);
    fileManager.createDirectory("/", "a");
    fileManager.createDirectory("/", "z");
    fileManager.saveFile("/", "y.txt", "Some content");
    fileManager.saveFile("/", "b.txt", "Some content");

    request.setParameter("path", "/");
    request.setParameter("type", FileMetaData.BLOG_FILE);
View Full Code Here

Examples of net.sourceforge.pebble.domain.FileManager.saveFile()

    // create some files and directories
    FileManager fileManager = new FileManager(blog, FileMetaData.BLOG_FILE);
    fileManager.createDirectory("/", "a");
    fileManager.createDirectory("/", "z");
    fileManager.saveFile("/", "y.txt", "Some content");
    fileManager.saveFile("/", "b.txt", "Some content");

    request.setParameter("path", "/");
    request.setParameter("type", FileMetaData.BLOG_FILE);

    View view = action.process(request, response);
View Full Code Here

Examples of net.sourceforge.pebble.domain.FileManager.saveFile()

   * Tests that files can be accessed, even when the path isn't specified.
   */
  public void testViewFilesWhenPathNotSpecified() throws Exception {
    // create some files and directories
    FileManager fileManager = new FileManager(blog, FileMetaData.BLOG_FILE);
    fileManager.saveFile("/", "a.txt", "Some content");

    request.setParameter("type", FileMetaData.BLOG_FILE);
    action.process(request, response);
    List files = (List)action.getModel().get("files");
    assertEquals(1, files.size());
View Full Code Here

Examples of net.sourceforge.pebble.domain.FileManager.saveFile()

    log.debug("Saving to " + name);
    try {
      byte bytes[] = (byte[])struct.get(BITS);
      long itemSize = bytes.length/1024; // number of bytes / 1024
      if (FileManager.hasEnoughSpace(blog, itemSize)) {
        FileMetaData file = manager.saveFile(name, bytes);
        ht.put(URL, file.getUrl());
      } else {
        throw new XmlRpcException(0, "You do not have enough free space - please free some space by removing unused files or asking your system administrator to increase your quota from " + PebbleContext.getInstance().getConfiguration().getFileUploadQuota() + " KB.");
      }
    } catch (IOException e) {
View Full Code Here

Examples of net.sourceforge.pebble.domain.FileManager.saveFile()

    String path = request.getParameter("path");
    String content = request.getParameter("fileContent");

    try {
      FileManager fileManager = new FileManager(blog, type);
      fileManager.saveFile(path, name, content);

      // if it's a theme file, also save a copy to blog.dir/theme
      if (type.equals(FileMetaData.THEME_FILE)) {
        fileManager = new FileManager(blog, FileMetaData.BLOG_DATA);
        fileManager.saveFile("/theme" + path, name, content);
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.