You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2003/12/30 07:52:49 UTC

cvs commit: jakarta-commons-sandbox/io/src/java/org/apache/commons/io CopyUtils.java EndianUtils.java

bayard      2003/12/29 22:52:49

  Modified:    io/src/java/org/apache/commons/io CopyUtils.java
                        EndianUtils.java
  Log:
  removed lots of finals
  
  Revision  Changes    Path
  1.3       +54 -54    jakarta-commons-sandbox/io/src/java/org/apache/commons/io/CopyUtils.java
  
  Index: CopyUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/CopyUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CopyUtils.java	13 Oct 2003 07:04:52 -0000	1.2
  +++ CopyUtils.java	30 Dec 2003 06:52:49 -0000	1.3
  @@ -93,7 +93,7 @@
        * @param output the <code>OutputStream</code> to write to
        * @throws IOException In case of an I/O problem
        */
  -    public static void copy(final byte[] input, final OutputStream output)
  +    public static void copy(byte[] input, OutputStream output)
           throws IOException {
           copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -106,8 +106,8 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final byte[] input,
  -            final OutputStream output,
  +            byte[] input,
  +            OutputStream output,
               int bufferSize)
                   throws IOException {
           // TODO Is bufferSize param needed?
  @@ -126,7 +126,7 @@
        * @param output the <code>Writer</code> to write to
        * @throws IOException In case of an I/O problem
        */
  -    public static void copy(final byte[] input, final Writer output)
  +    public static void copy(byte[] input, Writer output)
           throws IOException {
           copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -141,11 +141,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final byte[] input,
  -            final Writer output,
  -            final int bufferSize)
  +            byte[] input,
  +            Writer output,
  +            int bufferSize)
                   throws IOException {
  -        final ByteArrayInputStream in = new ByteArrayInputStream(input);
  +        ByteArrayInputStream in = new ByteArrayInputStream(input);
           copy(in, output, bufferSize);
       }
   
  @@ -160,11 +160,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final byte[] input,
  -            final Writer output,
  -            final String encoding)
  +            byte[] input,
  +            Writer output,
  +            String encoding)
                   throws IOException {
  -        final ByteArrayInputStream in = new ByteArrayInputStream(input);
  +        ByteArrayInputStream in = new ByteArrayInputStream(input);
           copy(in, output, encoding);
       }
   
  @@ -180,12 +180,12 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final byte[] input,
  -            final Writer output,
  -            final String encoding,
  -            final int bufferSize)
  +            byte[] input,
  +            Writer output,
  +            String encoding,
  +            int bufferSize)
                   throws IOException {
  -        final ByteArrayInputStream in = new ByteArrayInputStream(input);
  +        ByteArrayInputStream in = new ByteArrayInputStream(input);
           copy(in, output, encoding, bufferSize);
       }
   
  @@ -200,7 +200,7 @@
        * @return the number of bytes copied
        * @throws IOException In case of an I/O problem
        */
  -    public static int copy(final InputStream input, final OutputStream output)
  +    public static int copy(InputStream input, OutputStream output)
                   throws IOException {
           return copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -214,11 +214,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static int copy(
  -            final InputStream input,
  -            final OutputStream output,
  -            final int bufferSize)
  +            InputStream input,
  +            OutputStream output,
  +            int bufferSize)
                   throws IOException {
  -        final byte[] buffer = new byte[bufferSize];
  +        byte[] buffer = new byte[bufferSize];
           int count = 0;
           int n = 0;
           while (-1 != (n = input.read(buffer))) {
  @@ -239,7 +239,7 @@
        * @return the number of characters copied
        * @throws IOException In case of an I/O problem
        */
  -    public static int copy(final Reader input, final Writer output)
  +    public static int copy(Reader input, Writer output)
                   throws IOException {
           return copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -253,11 +253,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static int copy(
  -            final Reader input,
  -            final Writer output,
  -            final int bufferSize)
  +            Reader input,
  +            Writer output,
  +            int bufferSize)
                   throws IOException {
  -        final char[] buffer = new char[bufferSize];
  +        char[] buffer = new char[bufferSize];
           int count = 0;
           int n = 0;
           while (-1 != (n = input.read(buffer))) {
  @@ -279,7 +279,7 @@
        * @param output the <code>Writer</code> to write to
        * @throws IOException In case of an I/O problem
        */
  -    public static void copy(final InputStream input, final Writer output)
  +    public static void copy(InputStream input, Writer output)
               throws IOException {
           copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -294,11 +294,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final InputStream input,
  -            final Writer output,
  -            final int bufferSize)
  +            InputStream input,
  +            Writer output,
  +            int bufferSize)
                   throws IOException {
  -        final InputStreamReader in = new InputStreamReader(input);
  +        InputStreamReader in = new InputStreamReader(input);
           copy(in, output, bufferSize);
       }
   
  @@ -313,11 +313,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final InputStream input,
  -            final Writer output,
  -            final String encoding)
  +            InputStream input,
  +            Writer output,
  +            String encoding)
                   throws IOException {
  -        final InputStreamReader in = new InputStreamReader(input, encoding);
  +        InputStreamReader in = new InputStreamReader(input, encoding);
           copy(in, output);
       }
   
  @@ -333,12 +333,12 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final InputStream input,
  -            final Writer output,
  -            final String encoding,
  -            final int bufferSize)
  +            InputStream input,
  +            Writer output,
  +            String encoding,
  +            int bufferSize)
                   throws IOException {
  -        final InputStreamReader in = new InputStreamReader(input, encoding);
  +        InputStreamReader in = new InputStreamReader(input, encoding);
           copy(in, output, bufferSize);
       }
   
  @@ -353,7 +353,7 @@
        * @param output the <code>OutputStream</code> to write to
        * @throws IOException In case of an I/O problem
        */
  -    public static void copy(final Reader input, final OutputStream output)
  +    public static void copy(Reader input, OutputStream output)
               throws IOException {
           copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -367,11 +367,11 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final Reader input,
  -            final OutputStream output,
  -            final int bufferSize)
  +            Reader input,
  +            OutputStream output,
  +            int bufferSize)
                   throws IOException {
  -        final OutputStreamWriter out = new OutputStreamWriter(output);
  +        OutputStreamWriter out = new OutputStreamWriter(output);
           copy(input, out, bufferSize);
           // XXX Unless anyone is planning on rewriting OutputStreamWriter, we have to flush here.
           out.flush();
  @@ -388,7 +388,7 @@
        * @param output the <code>OutputStream</code> to write to
        * @throws IOException In case of an I/O problem
        */
  -    public static void copy(final String input, final OutputStream output)
  +    public static void copy(String input, OutputStream output)
               throws IOException {
           copy(input, output, DEFAULT_BUFFER_SIZE);
       }
  @@ -402,12 +402,12 @@
        * @throws IOException In case of an I/O problem
        */
       public static void copy(
  -            final String input,
  -            final OutputStream output,
  -            final int bufferSize)
  +            String input,
  +            OutputStream output,
  +            int bufferSize)
                   throws IOException {
  -        final StringReader in = new StringReader(input);
  -        final OutputStreamWriter out = new OutputStreamWriter(output);
  +        StringReader in = new StringReader(input);
  +        OutputStreamWriter out = new OutputStreamWriter(output);
           copy(in, out, bufferSize);
           // XXX Unless anyone is planning on rewriting OutputStreamWriter, we have to flush here.
           out.flush();
  @@ -423,7 +423,7 @@
        * @param output the <code>Writer</code> to write to
        * @throws IOException In case of an I/O problem
        */
  -    public static void copy(final String input, final Writer output)
  +    public static void copy(String input, Writer output)
                   throws IOException {
           output.write(input);
       }
  
  
  
  1.9       +20 -20    jakarta-commons-sandbox/io/src/java/org/apache/commons/io/EndianUtils.java
  
  Index: EndianUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/io/src/java/org/apache/commons/io/EndianUtils.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EndianUtils.java	30 Dec 2003 06:50:16 -0000	1.8
  +++ EndianUtils.java	30 Dec 2003 06:52:49 -0000	1.9
  @@ -349,8 +349,8 @@
       public static int readSwappedUnsignedShort( InputStream input )
           throws IOException
       {
  -        final int value1 = read( input );
  -        final int value2 = read( input );
  +        int value1 = read( input );
  +        int value2 = read( input );
   
           return (int)( ( ( value1 & 0xff ) << 0 ) +
               ( ( value2 & 0xff ) << 8 ) );
  @@ -382,10 +382,10 @@
       public static int readSwappedInteger( InputStream input )
           throws IOException
       {
  -        final int value1 = read( input );
  -        final int value2 = read( input );
  -        final int value3 = read( input );
  -        final int value4 = read( input );
  +        int value1 = read( input );
  +        int value2 = read( input );
  +        int value3 = read( input );
  +        int value4 = read( input );
   
           return (int)( ( ( value1 & 0xff ) << 0 ) +
               ( ( value2 & 0xff ) << 8 ) +
  @@ -403,10 +403,10 @@
       public static long readSwappedUnsignedInteger( InputStream input )
           throws IOException
       {
  -        final int value1 = read( input );
  -        final int value2 = read( input );
  -        final int value3 = read( input );
  -        final int value4 = read( input );
  +        int value1 = read( input );
  +        int value2 = read( input );
  +        int value3 = read( input );
  +        int value4 = read( input );
   
           return (long)( ( ( value1 & 0xff ) << 0 ) +
               ( ( value2 & 0xff ) << 8 ) +
  @@ -444,14 +444,14 @@
       public static long readSwappedLong( InputStream input )
           throws IOException
       {
  -        final int value1 = read( input );
  -        final int value2 = read( input );
  -        final int value3 = read( input );
  -        final int value4 = read( input );
  -        final int value5 = read( input );
  -        final int value6 = read( input );
  -        final int value7 = read( input );
  -        final int value8 = read( input );
  +        int value1 = read( input );
  +        int value2 = read( input );
  +        int value3 = read( input );
  +        int value4 = read( input );
  +        int value5 = read( input );
  +        int value6 = read( input );
  +        int value7 = read( input );
  +        int value8 = read( input );
   
           return (long)( ( ( value1 & 0xff ) << 0 ) +
               ( ( value2 & 0xff ) << 8 ) +
  @@ -518,7 +518,7 @@
       private static int read( InputStream input )
           throws IOException
       {
  -        final int value = input.read();
  +        int value = input.read();
   
           if( -1 == value )
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org