Package org.apache.wicket.util.resource

Examples of org.apache.wicket.util.resource.FileResourceStream


    {
      Folder folder = foldersIter.next();
      final File file = new File(folder, pathname);
      if (file.exists())
      {
        return new FileResourceStream(file);
      }
    }

    Iterator<String> webappPathsIter = webappPaths.iterator();
    while (webappPathsIter.hasNext())
View Full Code Here


      Folder folder = folders.get(i);
      final File file = new File(folder, pathname);

      if (file.exists())
      {
        return new FileResourceStream(file);
      }
    }

    return null;
  }
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      public IResourceStream getResourceStream()
      {
        return new FileResourceStream(new org.apache.wicket.util.file.File(testFile));
      }
    };
    resource.onResourceRequested();
    tester.processRequestCycle(cycle);
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      public IResourceStream getResourceStream()
      {
        return new FileResourceStream(new org.apache.wicket.util.file.File(testFile));
      }
    };
    resource.setCacheable(false);
    resource.onResourceRequested();
    tester.processRequestCycle(cycle);
View Full Code Here

                backup_dir,
                includeFilesInBackup.getConvertedInput()
                    .booleanValue());

            download.setFileName(backupFile.getName());
            download.setResourceStream(new FileResourceStream(
                backupFile));
            download.initiate(target);
          } catch (Exception e) {
            log.error("Exception on panel backup download ", e);
            uploadFeedback.error(e);
View Full Code Here

    }
    catch (IOException e)
    {
      throw new RuntimeException(e);
    }
    bindToApplicationAsResourceAndRequestIt(new FileResourceStream(
      new org.apache.wicket.util.file.File(testFile)));
    assertEquals(MockHttpServletResponse.formatDate(testFile.lastModified()),
      tester.getLastModifiedFromResponseHeader());
    assertEquals(TEST_STRING.length(), tester.getContentLengthFromResponseHeader());
  }
View Full Code Here

      private long getChunkLength() {
        return isRange ? end - start + 1 : (file == null ? -1 : file.length());
      }
     
      private IResourceStream getResourceStream() {
        return file == null ? null : new FileResourceStream(file) {
          private static final long serialVersionUID = 2546785247219805747L;
          private transient BoundedInputStream bi;

          @Override
          public InputStream getInputStream() throws ResourceStreamNotFoundException {
View Full Code Here

      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        download.setFileName(rm.getObject().getAlternateDownload());
        download.setResourceStream(new FileResourceStream(getRecording(rm.getObject().getAlternateDownload())));
        download.initiate(target);
      }
    });
    dFLV.add(new AjaxEventBehavior("click"){
      private static final long serialVersionUID = 1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        download.setFileName(rm.getObject().getFileHash());
        download.setResourceStream(new FileResourceStream(getRecording(rm.getObject().getFileHash())));
        download.initiate(target);
      }
    });
    add(download);
    update(null, r);
View Full Code Here

                backupFile,
                backup_dir,
                includeFilesInBackup.getObject());

            download.setFileName(backupFile.getName());
            download.setResourceStream(new FileResourceStream(backupFile));
            download.initiate(target);
          } catch (Exception e) {
            log.error("Exception on panel backup download ", e);
            uploadFeedback.error(e);
          }
View Full Code Here

      private long getChunkLength() {
        return isRange ? end - start + 1 : (file == null ? -1 : file.length());
      }
     
      private IResourceStream getResourceStream() {
        return file == null ? null : new FileResourceStream(file) {
          private static final long serialVersionUID = 2546785247219805747L;
          private transient BoundedInputStream bi;

          @Override
          public InputStream getInputStream() throws ResourceStreamNotFoundException {
View Full Code Here

TOP

Related Classes of org.apache.wicket.util.resource.FileResourceStream

Copyright © 2018 www.massapicom. 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.