Package org.apache.wicket.util.resource

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


                sw = new StringWriter();
                LangExport.serializetoXML(sw, "UTF-8", doc);
                is = new ByteArrayInputStream(sw.toString().getBytes());
                return is;
              } catch (Exception e) {
                throw new ResourceStreamNotFoundException(e);
              }
            }
           
            public void close() throws IOException {
              if (is != null) {
View Full Code Here


    final ServletContext context = ((WebApplication)Application.get()).getServletContext();

    in = context.getResourceAsStream(url);
    if (in == null)
    {
      throw new ResourceStreamNotFoundException("The requested resource was not found: " +
        url);
    }
    return in;
  }
View Full Code Here

      data.inputStreams.add(is);
      return is;
    }
    catch (IOException e)
    {
      throw new ResourceStreamNotFoundException("Resource " + url + " could not be opened", e);
    }
  }
View Full Code Here

        try {
            execute();
            return responseEntity.getContent();
        } catch (Exception e) {
            throw new ResourceStreamNotFoundException(e);
        }
    }
View Full Code Here

            return null;
        }

        public InputStream getInputStream() throws ResourceStreamNotFoundException {
            if (content == null) {
                throw new ResourceStreamNotFoundException();
            }
            return new ByteArrayInputStream(content);
        }
View Full Code Here

                Template t = cfg.getTemplate(templateName);
                t.process(model, new OutputStreamWriter(output));

                return new ByteArrayInputStream(output.toByteArray());
            } catch (IOException e) {
                throw (ResourceStreamNotFoundException) new ResourceStreamNotFoundException(
                        "Could not find template for: " + clazz).initCause(e);
            } catch (TemplateException e) {
                throw (ResourceStreamNotFoundException) new ResourceStreamNotFoundException(
                        "Error in tempalte for: " + clazz).initCause(e);
            }
        }
View Full Code Here

                sw = new StringWriter();
                LangExport.serializetoXML(sw, "UTF-8", doc);
                is = new ByteArrayInputStream(sw.toString().getBytes());
                return is;
              } catch (Exception e) {
                throw new ResourceStreamNotFoundException(e);
              }
            }
           
            public void close() throws IOException {
              if (is != null) {
View Full Code Here

                Template t = cfg.getTemplate(templateName);
                t.process(model, new OutputStreamWriter(output));

                return new ByteArrayInputStream(output.toByteArray());
            } catch (IOException e) {
                throw (ResourceStreamNotFoundException) new ResourceStreamNotFoundException(
                        "Could not find template for: " + clazz).initCause(e);
            } catch (TemplateException e) {
                throw (ResourceStreamNotFoundException) new ResourceStreamNotFoundException(
                        "Error in tempalte for: " + clazz).initCause(e);
            }
        }
View Full Code Here

        public InputStream getInputStream() throws ResourceStreamNotFoundException {
            if (inputStream == null) {
                try {
                    inputStream = url.openStream();
                } catch (IOException e) {
                    throw new ResourceStreamNotFoundException("Resource " + url
                            + " could not be opened", e);
                }
            }

            return inputStream;
View Full Code Here

            return null;
        }

        public InputStream getInputStream() throws ResourceStreamNotFoundException {
            if (content == null) {
                throw new ResourceStreamNotFoundException();
            }
            return new ByteArrayInputStream(content);
        }
View Full Code Here

TOP

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

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.