You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2009/01/06 14:00:51 UTC

svn commit: r731931 - in /webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon: ./ core/ core/filter/

Author: veithen
Date: Tue Jan  6 05:00:49 2009
New Revision: 731931

URL: http://svn.apache.org/viewvc?rev=731931&view=rev
Log:
Simplified/improved exception handling.

Added:
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamException.java
Modified:
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/SlowLinkSimulator.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/AbstractConnection.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/CharsetDecoderFilter.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyClientHandler.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyServerHandler.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpRequestFilter.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Pipeline.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/RequestLineExtractor.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Stream.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamFilter.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Tee.java
    webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/XmlFormatFilter.java

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/SlowLinkSimulator.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/SlowLinkSimulator.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/SlowLinkSimulator.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/SlowLinkSimulator.java Tue Jan  6 05:00:49 2009
@@ -16,8 +16,6 @@
 
 package org.apache.ws.commons.tcpmon;
 
-import java.io.IOException;
-
 import org.apache.ws.commons.tcpmon.core.filter.Stream;
 import org.apache.ws.commons.tcpmon.core.filter.StreamFilter;
 
@@ -109,7 +107,7 @@
         }
     }
 
-    public void invoke(Stream stream) throws IOException {
+    public void invoke(Stream stream) {
         pump(stream.available());
         stream.skipAll();
     }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/AbstractConnection.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/AbstractConnection.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/AbstractConnection.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/AbstractConnection.java Tue Jan  6 05:00:49 2009
@@ -24,6 +24,7 @@
 import org.apache.ws.commons.tcpmon.core.filter.HttpProxyServerHandler;
 import org.apache.ws.commons.tcpmon.core.filter.Pipeline;
 import org.apache.ws.commons.tcpmon.core.filter.RequestLineExtractor;
+import org.apache.ws.commons.tcpmon.core.filter.StreamException;
 import org.apache.ws.commons.tcpmon.core.filter.Tee;
 import org.apache.ws.commons.tcpmon.core.filter.XmlFormatFilter;
 
@@ -153,8 +154,12 @@
             });
             if (config.isProxy()) {
                 requestPipeline.addFilter(new HttpProxyServerHandler() {
-                    protected void handleConnection(String host, int port) throws IOException {
-                        outSocket = new Socket(host, port);
+                    protected void handleConnection(String host, int port) {
+                        try {
+                            outSocket = new Socket(host, port);
+                        } catch (IOException ex) {
+                            throw new StreamException(ex);
+                        }
                     }
                 });
             } else if (HTTPProxyHost != null) {

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java Tue Jan  6 05:00:49 2009
@@ -18,6 +18,7 @@
 
 import org.apache.ws.commons.tcpmon.core.filter.Pipeline;
 
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.Socket;
@@ -108,9 +109,13 @@
             long start = System.currentTimeMillis();
             int c;
             do {
-                // TODO: we should distinguish here between exceptions thrown when reading from the
-                //       input stream and exceptions thrown in the pipeline
-                c = pipeline.readFrom(in);
+                try {
+                    c = pipeline.readFrom(in);
+                } catch (IOException ex) {
+                    // When reading from the socket, consider an I/O exception (such as connection
+                    // reset) as the end of stream and silently discard the exception.
+                    c = -1;
+                }
                 elapsed = System.currentTimeMillis() - start;
             } while (c != -1);
         } catch (Exception e) {

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/CharsetDecoderFilter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/CharsetDecoderFilter.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/CharsetDecoderFilter.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/CharsetDecoderFilter.java Tue Jan  6 05:00:49 2009
@@ -29,11 +29,15 @@
         this.writer = writer;
     }
 
-    public void invoke(Stream stream) throws IOException {
+    public void invoke(Stream stream) {
         StringBuffer buffer = new StringBuffer(stream.available());
         while (stream.available() > 0) {
             buffer.append((char)stream.skip());
         }
-        writer.write(buffer.toString());
+        try {
+            writer.write(buffer.toString());
+        } catch (IOException ex) {
+            throw new StreamException(ex);
+        }
     }
 }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyClientHandler.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyClientHandler.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyClientHandler.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyClientHandler.java Tue Jan  6 05:00:49 2009
@@ -16,8 +16,6 @@
 
 package org.apache.ws.commons.tcpmon.core.filter;
 
-import java.io.IOException;
-
 /**
  * Filter that rewrites a plain HTTP request to an HTTP proxy request.
  */
@@ -30,7 +28,7 @@
         this.targetPort = targetPort;
     }
     
-    protected String processRequest(String request) throws IOException {
+    protected String processRequest(String request) {
         String[] parts = request.split(" ");
         return parts[0] + " http://" + targetHost + ":" + targetPort + parts[1] + " " + parts[2];
     }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyServerHandler.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyServerHandler.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyServerHandler.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpProxyServerHandler.java Tue Jan  6 05:00:49 2009
@@ -16,20 +16,25 @@
 
 package org.apache.ws.commons.tcpmon.core.filter;
 
-import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URL;
 
 /**
  * Filter that rewrites an HTTP proxy request to a plain HTTP request.
  */
 public abstract class HttpProxyServerHandler extends HttpRequestFilter {
-    protected String processRequest(String request) throws IOException {
+    protected String processRequest(String request) {
         String[] parts = request.split(" ");
-        URL url = new URL(parts[1]);
+        URL url;
+        try {
+            url = new URL(parts[1]);
+        } catch (MalformedURLException ex) {
+            throw new StreamException(ex);
+        }
         int port = url.getPort();
         handleConnection(url.getHost(), port == -1 ? 80 : port);
         return parts[0] + " " + url.getFile() + " " + parts[2];
     }
     
-    protected abstract void handleConnection(String host, int port) throws IOException;
+    protected abstract void handleConnection(String host, int port);
 }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpRequestFilter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpRequestFilter.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpRequestFilter.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/HttpRequestFilter.java Tue Jan  6 05:00:49 2009
@@ -16,7 +16,7 @@
 
 package org.apache.ws.commons.tcpmon.core.filter;
 
-import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 
 /**
  * Abstract filter that allows HTTP request rewriting.
@@ -28,7 +28,7 @@
     
     private int state = STATE_REQUEST;
     
-    public void invoke(Stream stream) throws IOException {
+    public void invoke(Stream stream) {
         while (stream.available() > 0) {
             switch (state) {
                 case STATE_REQUEST: {
@@ -91,16 +91,22 @@
         }
     }
     
-    private static void insert(Stream stream, String s) throws IOException {
-        byte[] b = s.getBytes("ascii");
+    private static void insert(Stream stream, String s) {
+        byte[] b;
+        try {
+            b = s.getBytes("ascii");
+        } catch (UnsupportedEncodingException ex) {
+            // We should never get here
+            throw new StreamException(ex);
+        }
         stream.insert(b, 0, b.length);
     }
     
-    protected String processRequest(String request) throws IOException {
+    protected String processRequest(String request) {
         return request;
     }
     
-    protected String processHeader(String name, String value) throws IOException {
+    protected String processHeader(String name, String value) {
         return value;
     }
 }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Pipeline.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Pipeline.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Pipeline.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Pipeline.java Tue Jan  6 05:00:49 2009
@@ -61,12 +61,12 @@
             this.next = next;
         }
 
-        public void invoke(byte[] buffer, int offset, int length, boolean eos, boolean preserve) throws IOException {
+        public void invoke(byte[] buffer, int offset, int length, boolean eos, boolean preserve) {
             while (length > 0) {
                 if (inLength > 0) {
                     int c = fillBuffer(buffer, offset, length);
                     if (c == 0) {
-                        throw new IOException("Pipeline buffer overflow");
+                        throw new StreamException("Pipeline buffer overflow");
                     }
                     offset += c;
                     length -= c;
@@ -97,7 +97,7 @@
             }
         }
         
-        private void setBuffer(byte[] buffer, int offset, int length, boolean preserve) throws IOException {
+        private void setBuffer(byte[] buffer, int offset, int length, boolean preserve) {
             flushSkip(false);
             if (inBuffer != null) {
                 if (inLength > 0) {
@@ -113,7 +113,7 @@
             this.preserve = preserve;
         }
         
-        private int fillBuffer(byte[] buffer, int offset, int length) throws IOException {
+        private int fillBuffer(byte[] buffer, int offset, int length) {
             if (!preserve && length <= inBuffer.length-inOffset-inLength) {
                 System.arraycopy(buffer, offset, inBuffer, inOffset+inLength, length);
                 inLength += length;
@@ -127,7 +127,7 @@
             }
         }
         
-        private void compactBuffer() throws IOException {
+        private void compactBuffer() {
             flushSkip(false);
             byte[] src = inBuffer;
             if (preserve) {
@@ -138,7 +138,7 @@
             inOffset = 0;
         }
         
-        private void invokeNext(byte[] buffer, int offset, int length, boolean eos, boolean preserve) throws IOException {
+        private void invokeNext(byte[] buffer, int offset, int length, boolean eos, boolean preserve) {
             if (eos && eosSignalled) {
                 throw new IllegalStateException();
             }
@@ -150,7 +150,7 @@
             eosSignalled = eos;
         }
 
-        private void flushSkip(boolean eos) throws IOException {
+        private void flushSkip(boolean eos) {
             if (skipLength > 0) {
                 if (outLength > 0) {
                     throw new IllegalStateException();
@@ -166,7 +166,7 @@
             }
         }
         
-        private void flushOutput(boolean eos) throws IOException {
+        private void flushOutput(boolean eos) {
             if (outLength > 0) {
                 if (skipLength > 0) {
                     throw new IllegalStateException();
@@ -227,7 +227,7 @@
             inLength -= len;
         }
 
-        public void insert(byte b) throws IOException {
+        public void insert(byte b) {
             flushSkip(false);
             if (outLength > 0 && outLength == outBuffer.length) {
                 flushOutput(false);
@@ -238,19 +238,19 @@
             outBuffer[outLength++] = b;
         }
         
-        public void insert(byte[] buffer, int offset, int length) throws IOException {
+        public void insert(byte[] buffer, int offset, int length) {
             flushSkip(false);
             flushOutput(false);
             invokeNext(buffer, offset, length, false, true);
         }
 
-        public byte skip() throws IOException {
+        public byte skip() {
             byte b = inBuffer[inOffset];
             skip(1);
             return b;
         }
 
-        public void skip(int len) throws IOException {
+        public void skip(int len) {
             if (len < 0 || len > inLength) {
                 throw new ArrayIndexOutOfBoundsException();
             }
@@ -271,7 +271,7 @@
             inLength -= len;
         }
 
-        public void skipAll() throws IOException {
+        public void skipAll() {
             skip(inLength);
         }
     }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/RequestLineExtractor.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/RequestLineExtractor.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/RequestLineExtractor.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/RequestLineExtractor.java Tue Jan  6 05:00:49 2009
@@ -16,7 +16,7 @@
 
 package org.apache.ws.commons.tcpmon.core.filter;
 
-import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 
 /**
  * Filter that extracts the first line of a request, up to a given
@@ -31,7 +31,7 @@
         this.buffer = new byte[maxLength];
     }
     
-    public void invoke(Stream stream) throws IOException {
+    public void invoke(Stream stream) {
         if (done) {
             stream.skipAll();
         } else {
@@ -48,7 +48,14 @@
             }
             if (done) {
                 stream.skipAll();
-                done(new String(buffer, 0, length, "ascii"));
+                String requestLine;
+                try {
+                    requestLine = new String(buffer, 0, length, "ascii");
+                } catch (UnsupportedEncodingException ex) {
+                    // We should never get here
+                    throw new StreamException(ex);
+                }
+                done(requestLine);
             }
         }
     }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Stream.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Stream.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Stream.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Stream.java Tue Jan  6 05:00:49 2009
@@ -113,9 +113,8 @@
      * be read, discarded or skipped.
      * 
      * @param b the byte to insert
-     * @throws IOException
      */
-    void insert(byte b) throws IOException;
+    void insert(byte b);
     
     /**
      * Insert a byte sequence at the current position in the stream.
@@ -125,9 +124,8 @@
      * @param buffer a byte array containing the sequence to be inserted in the stream
      * @param offset the start offset in the byte array
      * @param length the number of bytes to insert
-     * @throws IOException
      */
-    void insert(byte[] buffer, int offset, int length) throws IOException;
+    void insert(byte[] buffer, int offset, int length);
     
     /**
      * Skip the byte at the current position in the stream.
@@ -135,25 +133,21 @@
      * to the next filter.
      * 
      * @return the byte at the current position in the stream 
-     * @throws IOException
      */
-    byte skip() throws IOException;
+    byte skip();
     
     /**
      * Skip a given number of bytes in the stream, starting
      * from the current position.
      * 
      * @param len the number of bytes to skip
-     * @throws IOException
      */
-    void skip(int len) throws IOException;
+    void skip(int len);
     
     /**
      * Skip all the bytes currently available in the stream.
      * The instruction <code>s.skipAll()</code> is equivalent to
      * <code>s.skip(s.available())</code>.
-     * 
-     * @throws IOException
      */
-    void skipAll() throws IOException;
+    void skipAll();
 }

Added: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamException.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamException.java?rev=731931&view=auto
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamException.java (added)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamException.java Tue Jan  6 05:00:49 2009
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ws.commons.tcpmon.core.filter;
+
+public class StreamException extends RuntimeException {
+    private static final long serialVersionUID = 3318471666512565646L;
+
+    public StreamException() {
+        super();
+    }
+
+    public StreamException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public StreamException(String message) {
+        super(message);
+    }
+
+    public StreamException(Throwable cause) {
+        super(cause);
+    }
+}

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamFilter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamFilter.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamFilter.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/StreamFilter.java Tue Jan  6 05:00:49 2009
@@ -16,8 +16,6 @@
 
 package org.apache.ws.commons.tcpmon.core.filter;
 
-import java.io.IOException;
-
 /**
  * A filter acting on a stream.
  */
@@ -37,7 +35,6 @@
      * of the filter. 
      * 
      * @param stream the stream to process
-     * @throws IOException
      */
-    void invoke(Stream stream) throws IOException;
+    void invoke(Stream stream);
 }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Tee.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Tee.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Tee.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/Tee.java Tue Jan  6 05:00:49 2009
@@ -46,9 +46,13 @@
         this.out = out;
     }
 
-    public void invoke(Stream stream) throws IOException {
+    public void invoke(Stream stream) {
         if (out != null) {
-            stream.readAll(out);
+            try {
+                stream.readAll(out);
+            } catch (IOException ex) {
+                throw new StreamException(ex);
+            }
             stream.skipAll();
         }
     }

Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/XmlFormatFilter.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/XmlFormatFilter.java?rev=731931&r1=731930&r2=731931&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/XmlFormatFilter.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/filter/XmlFormatFilter.java Tue Jan  6 05:00:49 2009
@@ -16,8 +16,6 @@
 
 package org.apache.ws.commons.tcpmon.core.filter;
 
-import java.io.IOException;
-
 /**
  * Filter that reformats XML data so that it is properly indented.
  */
@@ -30,7 +28,7 @@
         this.tabWidth = tabWidth;
     }
 
-    public void invoke(Stream stream) throws IOException {
+    public void invoke(Stream stream) {
         try {
             boolean inXML = false;
             while (stream.available() > 0) {