Examples of loadFile()


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

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

    // check file was saved and the right view is returned
    FileManager fileManager = new FileManager(blog, FileMetaData.BLOG_FILE);
    assertEquals("Some content.", fileManager.loadFile("/", "afile.txt"));
    assertTrue(view instanceof ForwardView);

    // and clean up
    fileManager.deleteFile("/", "afile.txt");
  }
View Full Code Here

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

    FileManager fileManager = new FileManager(blog, type);
    FileMetaData file = fileManager.getFileMetaData(path, name);
    FileMetaData parent = fileManager.getParent(file);

    try {
      String content = fileManager.loadFile(path, name);
      getModel().put("fileContent", content);
    } catch (IllegalFileAccessException e) {
      return new ForbiddenView();
    }
View Full Code Here

Examples of org.cishell.app.service.fileloader.FileLoaderService.loadFile()

              uniqueServiceReference, new LocalCIShellContext(Activator.context));
            LogService uniqueLogger =
              (LogService) ciShellContext.getService(LogService.class.getName());

              try {
                Data[] inputData = fileLoader.loadFile(
                  Activator.context,
                  ciShellContext,
                  uniqueLogger,
                  ProgressMonitor.NULL_MONITOR,
                  file);
View Full Code Here

Examples of org.jbpm.formbuilder.server.file.FileService.loadFile()

    public void testGetFileOK() throws Exception {
        RESTFileService restService = new RESTFileService();
        List<Object> requestMocks = createRequestMocks();
        FileService fileService = EasyMock.createMock(FileService.class);
        byte[] myContent = new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9};
        EasyMock.expect(fileService.loadFile(EasyMock.same("somePackage"), EasyMock.same("myFile.tmp"))).
            andReturn(myContent);
        requestMocks.add(fileService);
        restService.setFileService(fileService);
        Object[] mocks = requestMocks.toArray();
        EasyMock.replay(mocks);
View Full Code Here

Examples of org.jbpm.formbuilder.server.file.FileService.loadFile()

    public void testGetFileServiceProblem() throws Exception {
        RESTFileService restService = new RESTFileService();
        List<Object> requestMocks = createRequestMocks();
        FileService fileService = EasyMock.createMock(FileService.class);
        FileException exception = new FileException(new NullPointerException());
        EasyMock.expect(fileService.loadFile(EasyMock.same("somePackage"), EasyMock.same("myFile.tmp"))).
            andThrow(exception);
        requestMocks.add(fileService);
        restService.setFileService(fileService);
        Object[] mocks = requestMocks.toArray();
        EasyMock.replay(mocks);
View Full Code Here

Examples of org.jmule.core.edonkey.metfile.KnownMet.loadFile()

          files_hash_set.add(fileHash);

      // load shared completed files
      try {
        KnownMet known_met = new KnownMet(knownFilePath);
        known_file_list = known_met.loadFile();
        known_met.close();
      } catch (Throwable e) {
        e.printStackTrace();
        known_file_list = new Hashtable<String, KnownMetEntity>();
      }
View Full Code Here

Examples of org.jmule.core.edonkey.metfile.PartMet.loadFile()

      File shared_dir = new File(ConfigurationManager.TEMP_DIR);
      traverseDir(shared_dir, true, new WorkOnFiles() {
        public void doWork(File file) {
          try {
            PartMet part_met = new PartMet(file);
            part_met.loadFile();
            PartialFile partial_shared_file = new PartialFile(
                part_met);
            sharedFiles.put(partial_shared_file.getFileHash(),
                partial_shared_file);
            JMuleCoreFactory.getSingleton().getDownloadManager()
View Full Code Here

Examples of org.jnode.apps.editor.TextEditor.loadFile()

            (ConsoleManager.CreateOptions.TEXT |
                ConsoleManager.CreateOptions.NO_SYSTEM_OUT_ERR |
                ConsoleManager.CreateOptions.NO_LINE_EDITTING));

        TextEditor te = new TextEditor(console);
        te.loadFile(file);
    }
}
View Full Code Here

Examples of org.jruby.IRuby.loadFile()

    public void test() {
        IRuby runtime = org.jruby.Ruby.getDefaultInstance();
        try {
            File f = new File(DATA + "snippets1.rb");
            runtime.loadFile(f, false);
            f = new File(DATA + "snippets2.rb");
            runtime.loadFile(f, false);
            IRubyObject rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
            rubyObject = runtime.evalScript("init");
View Full Code Here

Examples of org.jruby.IRuby.loadFile()

        IRuby runtime = org.jruby.Ruby.getDefaultInstance();
        try {
            File f = new File(DATA + "snippets1.rb");
            runtime.loadFile(f, false);
            f = new File(DATA + "snippets2.rb");
            runtime.loadFile(f, false);
            IRubyObject rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
            rubyObject = runtime.evalScript("init");
            Assert.assertNotNull(rubyObject);
        } catch (Exception e) {
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.