Examples of FileResourceStream


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

      throw new IllegalStateException(getClass().getName() +
          " failed to retrieve a File object from model");
    }
    final String fn = (fileName != null) ? fileName : file.getName();

    IResourceStream resourceStream = new FileResourceStream(
        new org.apache.wicket.util.file.File(file));
    getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream)
    {
      public String getFileName()
      {
View Full Code Here

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

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

    iter = webappPaths.iterator();
    while (iter.hasNext())
View Full Code Here

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

      private static final long serialVersionUID = 1L;

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

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

       */
      private static final long serialVersionUID = 1L;

      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

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

      Folder 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

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

    }
    final String fn = UrlEncoder.QUERY_INSTANCE.encode((fileName != null) ? fileName
      : file.getName(), getRequest().getCharset());


    IResourceStream resourceStream = new FileResourceStream(
      new org.apache.wicket.util.file.File(file));
    getRequestCycle().scheduleRequestHandlerAfterCurrent(
      new ResourceStreamRequestHandler(resourceStream)
      {
        @Override
View Full Code Here

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

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

    catch (IOException e)
    {
      throw new RuntimeException(e);
    }

    IResource file = new ResourceStreamResource(new FileResourceStream(
      new org.apache.wicket.util.file.File(testFile)));
    tester.getApplication().getSharedResources().add("file", file);
    tester.getRequest().setUrl(
      tester.getRequestCycle().urlFor(
        tester.getApplication().getSharedResources().get(Application.class, "file", null,
View Full Code Here

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

    catch (IOException e)
    {
      throw new RuntimeException(e);
    }

    IResource file = new ResourceStreamResource(new FileResourceStream(
      new org.apache.wicket.util.file.File(testFile)));
    tester.getApplication().getSharedResources().add("file", file);
    tester.getRequest().setUrl(
      tester.getRequestCycle().mapUrlFor(
        tester.getApplication()
View Full Code Here

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

    }
    final String fn = WicketURLEncoder.QUERY_INSTANCE.encode((fileName != null) ? fileName
      : file.getName());


    IResourceStream resourceStream = new FileResourceStream(
      new org.apache.wicket.util.file.File(file));
    getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream)
    {
      @Override
      public String getFileName()
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.