cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r641690 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
Date Thu, 27 Mar 2008 02:24:03 GMT
Author: gmazza
Date: Wed Mar 26 19:24:01 2008
New Revision: 641690

URL: http://svn.apache.org/viewvc?rev=641690&view=rev
Log:
Fixed checkstyle errors.

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java?rev=641690&r1=641689&r2=641690&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java (original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/IOUtils.java Wed
Mar 26 19:24:01 2008
@@ -30,38 +30,36 @@
 public final class IOUtils {
 
     private static final int DEFAULT_BUFFER_SIZE = 1024 * 4;
-    
+
     private IOUtils() {
-        
+
     }
-    
+
     public static int copy(final InputStream input, final OutputStream output)
-        throws IOException {
+            throws IOException {
         return copy(input, output, DEFAULT_BUFFER_SIZE);
     }
 
-    public static int copyAndCloseInput(final InputStream input, final OutputStream output)
-        throws IOException {
+    public static int copyAndCloseInput(final InputStream input,
+            final OutputStream output) throws IOException {
         try {
             return copy(input, output, DEFAULT_BUFFER_SIZE);
         } finally {
             input.close();
         }
     }
+
     public static int copyAndCloseInput(final InputStream input,
-                                        final OutputStream output,
-                                        int bufferSize)
-        throws IOException {
+            final OutputStream output, int bufferSize) throws IOException {
         try {
             return copy(input, output, bufferSize);
         } finally {
             input.close();
         }
     }
-    public static int copy(final InputStream input,
-                            final OutputStream output,
-                            int bufferSize)
-        throws IOException {
+
+    public static int copy(final InputStream input, final OutputStream output,
+            int bufferSize) throws IOException {
         int avail = input.available();
         if (avail > 262144) {
             avail = 262144;
@@ -80,10 +78,9 @@
         }
         return total;
     }
-    public static void copy(final Reader input,
-                            final Writer output,
-                            final int bufferSize)
-        throws IOException {
+
+    public static void copy(final Reader input, final Writer output,
+            final int bufferSize) throws IOException {
         final char[] buffer = new char[bufferSize];
         int n = 0;
         n = input.read(buffer);
@@ -93,14 +90,12 @@
         }
     }
 
-    
-    public static String toString(final InputStream input) 
-        throws IOException {
+    public static String toString(final InputStream input) throws IOException {
         return toString(input, DEFAULT_BUFFER_SIZE);
     }
-    
-    public static String toString(final InputStream input, int bufferSize) 
-        throws IOException {
+
+    public static String toString(final InputStream input, int bufferSize)
+            throws IOException {
 
         int avail = input.available();
         if (avail > bufferSize) {
@@ -118,10 +113,9 @@
         input.close();
         return buf.toString();
     }
-    
-    public static String toString(final Reader input) 
-        throws IOException {
-        
+
+    public static String toString(final Reader input) throws IOException {
+
         StringBuilder buf = new StringBuilder();
         final char[] buffer = new char[DEFAULT_BUFFER_SIZE];
         int n = 0;
@@ -133,28 +127,31 @@
         input.close();
         return buf.toString();
     }
-    
-    public static String readStringFromStream(InputStream in) throws IOException {
+
+    public static String readStringFromStream(InputStream in)
+            throws IOException {
 
         StringBuilder sb = new StringBuilder(1024);
 
         for (int i = in.read(); i != -1; i = in.read()) {
-            sb.append((char)i);
+            sb.append((char) i);
         }
 
         in.close();
 
         return sb.toString();
     }
-    
+
     /**
-     * Load the InputStream into memory and return a ByteArrayInputStream that 
-     * represents it.  Closes the in stream.
+     * Load the InputStream into memory and return a ByteArrayInputStream that
+     * represents it. Closes the in stream.
+     * 
      * @param in
      * @return
      * @throws IOException
      */
-    public static ByteArrayInputStream loadIntoBAIS(InputStream in) throws IOException {
+    public static ByteArrayInputStream loadIntoBAIS(InputStream in)
+            throws IOException {
         int i = in.available();
         if (i < DEFAULT_BUFFER_SIZE) {
             i = DEFAULT_BUFFER_SIZE;



Mime
View raw message