Package org.apache.wicket.util.resource

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


        try {
            execute();
            return responseEntity.getContent();
        } catch (Exception e) {
            throw new ResourceStreamNotFoundException(e);
        }
    }
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

        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

                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

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

              //bi = new BoundedInputStream(super.getInputStream(), end + 1);
              bi = new BoundedInputStream(super.getInputStream(), isRange ? end + 1 : (file == null ? -1 : file.length()));
              try {
                bi.skip(start);
              } catch (IOException e) {
                throw new ResourceStreamNotFoundException(e);
              }
            }
            return bi;
          }
         
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

          try {
            con = getFeedConnection(url);
            con.connect();
            return con.getInputStream();
          } catch (IOException e) {
            throw new ResourceStreamNotFoundException();
          }
        }

        public void close() throws IOException {
          if (con != null) {
View Full Code Here

              //bi = new BoundedInputStream(super.getInputStream(), end + 1);
              bi = new BoundedInputStream(super.getInputStream(), isRange ? end + 1 : (file == null ? -1 : file.length()));
              try {
                bi.skip(start);
              } catch (IOException e) {
                throw new ResourceStreamNotFoundException(e);
              }
            }
            return bi;
          }
         
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.