Package org.ocpsoft.rewrite.exception

Examples of org.ocpsoft.rewrite.exception.RewriteException


            if (printWriter != null) {
               printWriter.close();
            }
         }
         catch (IOException e) {
            throw new RewriteException("Error occurred when flushing response content buffered by "
                     + responseContentInterceptors, e);
         }
      }
   }
View Full Code Here


      {
         try {
            return bufferedResponseContent.toString(getCharacterEncoding());
         }
         catch (UnsupportedEncodingException e) {
            throw new RewriteException("Response accepted invalid character encoding " + getCharacterEncoding(), e);
         }
      }
      else
         return super.toString();
   }
View Full Code Here

            try {
               lockStreams();
               return super.getWriter();
            }
            catch (IOException e) {
               throw new RewriteException("Could not get response writer.", e);
            }
         }
      }

      return printWriter;
View Full Code Here

            try {
               lockStreams();
               outputStream = super.getOutputStream();
            }
            catch (IOException e) {
               throw new RewriteException("Could not get response output stream.", e);
            }
         }

         if (isResponseStreamWrapped())
         {
            if (wrappedOutputStream == null)
            {
               HttpServletRewrite event = new HttpBufferRewriteImpl(request, this, servletContext);

               try {
                  OutputStream wrapped = super.getOutputStream();
                  for (ResponseStreamWrapper wrapper : responseStreamWrappers) {
                     wrapped = wrapper.wrap(event, wrapped);
                  }
                  wrappedOutputStream = new RewriteServletOutputStream(wrapped);
                  if (!isResponseContentIntercepted())
                  {
                     outputStream = wrappedOutputStream;
                  }
               }
               catch (IOException e) {
                  throw new RewriteException("Could not get response output stream.", e);
               }

            }
         }
      }
View Full Code Here

      {
         try {
            stream.write(b);
         }
         catch (IOException e) {
            throw new RewriteException("Error writing int to stream [" + stream + "]", e);
         }
      }
View Full Code Here

      {
         try {
            stream.write(bytes, off, len);
         }
         catch (IOException e) {
            throw new RewriteException("Error writing bytes to stream [" + stream + "] at offset [" + off
                     + "] with length [" + len + "]", e);
         }
      }
View Full Code Here

      else if (event instanceof OutboundRewrite)
         rewriteOutbound(event);

      else
         throw new RewriteException("Unknown Rewrite event type [" + event.getClass().getName()
                  + "] - was neither an inbound nor outbound Rewrite.");

   }
View Full Code Here

         proxyServlet.service(event.getRequest(), event.getResponse());
         Lifecycle.abort().perform(event, context);
      }
      catch (Exception e)
      {
         throw new RewriteException("Could not proxy event [" + event + "] to destination [" + destination + "]", e);
      }
   }
View Full Code Here

                  else
                     event.abort();
               }
            }
            catch (Exception e) {
               throw new RewriteException("Error processing [" + this.getClass().getName() + "]", e);
            }
         }
      }.perform(event, context);
   }
View Full Code Here

         response.flushBuffer();
         abort();
      }
      catch (IOException e)
      {
         throw new RewriteException("Could not send HTTP status code.", e);
      }
   }
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.exception.RewriteException

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.