hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r594061 - in /jakarta/httpcomponents/httpcore/trunk/module-nio/src: main/java/org/apache/http/impl/nio/codecs/ main/java/org/apache/http/nio/ test/java/org/apache/http/impl/nio/codecs/
Date Mon, 12 Nov 2007 09:34:56 GMT
Author: olegk
Date: Mon Nov 12 01:34:55 2007
New Revision: 594061

URL: http://svn.apache.org/viewvc?rev=594061&view=rev
Log:
Renamed incorrectly named methods

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentEncoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityDecoder.java
Mon Nov 12 01:34:55 2007
@@ -83,7 +83,7 @@
         return bytesRead;
     }
     
-    public long read(
+    public long transfer(
             final FileChannel fileChannel, 
             long position, 
             long count) throws IOException {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/IdentityEncoder.java
Mon Nov 12 01:34:55 2007
@@ -72,7 +72,7 @@
         return bytesWritten;
     }
  
-    public long write(
+    public long transfer(
             final FileChannel filechannel, 
             long position, 
             long count) throws IOException {

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedDecoder.java
Mon Nov 12 01:34:55 2007
@@ -107,7 +107,7 @@
         return bytesRead;
     }
     
-    public long read(final FileChannel fileChannel, long position, long count) throws IOException
{
+    public long transfer(final FileChannel fileChannel, long position, long count) throws
IOException {
         if (fileChannel == null) {
             return 0;
         }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/LengthDelimitedEncoder.java
Mon Nov 12 01:34:55 2007
@@ -97,7 +97,7 @@
         return bytesWritten;
     }
 
-    public long write(final FileChannel fileChannel, long position, long count) throws IOException
{
+    public long transfer(final FileChannel fileChannel, long position, long count) throws
IOException {
         if (fileChannel == null) {
             return 0;
         }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentDecoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentDecoder.java
Mon Nov 12 01:34:55 2007
@@ -43,7 +43,7 @@
      * Transfers a portion of entity content from the underlying network channel
      * into the given file channel.
      * 
-     * @param  channel the target FileChannel to transfer data into.
+     * @param  dst the target FileChannel to transfer data into.
      * @param  position
      *         The position within the file at which the transfer is to begin;
      *         must be non-negative
@@ -54,6 +54,6 @@
      * @return  The number of bytes, possibly zero,
      *          that were actually transferred
      */
-    long read(FileChannel channel, long position, long count) throws IOException;
+    long transfer(FileChannel dst, long position, long count) throws IOException;
     
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentEncoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/FileContentEncoder.java
Mon Nov 12 01:34:55 2007
@@ -44,7 +44,7 @@
      * Transfers a portion of entity content from the given file channel 
      * to the underlying network channel.
      * 
-     * @param  channel the source FileChannel to transfer data from.
+     * @param  src the source FileChannel to transfer data from.
      * @param  position
      *         The position within the file at which the transfer is to begin;
      *         must be non-negative
@@ -55,6 +55,6 @@
      * @return  The number of bytes, possibly zero,
      *          that were actually transferred
      */
-    long write(FileChannel channel, long position, long count) throws IOException;
+    long transfer(FileChannel src, long position, long count) throws IOException;
     
 }

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestIdentityDecoder.java
Mon Nov 12 01:34:55 2007
@@ -188,21 +188,21 @@
         File tmpFile = File.createTempFile("testFile", ".txt");
         FileChannel fchannel = new FileOutputStream(tmpFile).getChannel();
             
-        long bytesRead = decoder.read(fchannel, 0, 6);
+        long bytesRead = decoder.transfer(fchannel, 0, 6);
         assertEquals(6, bytesRead);
         assertEquals("stuff;", readFromFile(tmpFile, 6));
         assertFalse(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel,0 , 10);
+        bytesRead = decoder.transfer(fchannel,0 , 10);
         assertEquals(10, bytesRead);
         assertEquals("more stuff", readFromFile(tmpFile, 10));
         assertFalse(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel, 0, 1);
+        bytesRead = decoder.transfer(fchannel, 0, 1);
         assertEquals(0, bytesRead);
         assertTrue(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel, 0, 1);
+        bytesRead = decoder.transfer(fchannel, 0, 1);
         assertEquals(0, bytesRead);
         assertTrue(decoder.isCompleted());
         
@@ -226,21 +226,21 @@
         File tmpFile = File.createTempFile("testFile", ".txt");
         FileChannel fchannel = new FileOutputStream(tmpFile).getChannel();
             
-        long bytesRead = decoder.read(fchannel, 0, 6);
+        long bytesRead = decoder.transfer(fchannel, 0, 6);
         assertEquals(6, bytesRead);
         assertEquals("stuff;", readFromFile(tmpFile, 6));
         assertFalse(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel,0 , 10);
+        bytesRead = decoder.transfer(fchannel,0 , 10);
         assertEquals(10, bytesRead);
         assertEquals("more stuff", readFromFile(tmpFile, 10));
         assertFalse(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel, 0, 1);
+        bytesRead = decoder.transfer(fchannel, 0, 1);
         assertEquals(0, bytesRead);
         assertTrue(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel, 0, 1);
+        bytesRead = decoder.transfer(fchannel, 0, 1);
         assertEquals(0, bytesRead);
         assertTrue(decoder.isCompleted());
         

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedDecoder.java
Mon Nov 12 01:34:55 2007
@@ -291,17 +291,17 @@
         File tmpFile = File.createTempFile("testFile", ".txt");
         FileChannel fchannel = new FileOutputStream(tmpFile).getChannel();
         
-        long bytesRead = decoder.read(fchannel, 0, 6);
+        long bytesRead = decoder.transfer(fchannel, 0, 6);
         assertEquals(6, bytesRead);
         assertEquals("stuff;", readFromFile(tmpFile, 6));
         assertFalse(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel,0 , 10);
+        bytesRead = decoder.transfer(fchannel,0 , 10);
         assertEquals(10, bytesRead);
         assertEquals("more stuff", readFromFile(tmpFile, 10));
         assertTrue(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel, 0, 1);
+        bytesRead = decoder.transfer(fchannel, 0, 1);
         assertEquals(0, bytesRead);
         assertTrue(decoder.isCompleted());
         
@@ -323,17 +323,17 @@
         File tmpFile = File.createTempFile("testFile", ".txt");
         FileChannel fchannel = new FileOutputStream(tmpFile).getChannel();
         
-        long bytesRead = decoder.read(fchannel, 0, 6);
+        long bytesRead = decoder.transfer(fchannel, 0, 6);
         assertEquals(6, bytesRead);
         assertEquals("stuff;", readFromFile(tmpFile, 6));
         assertFalse(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel,0 , 10);
+        bytesRead = decoder.transfer(fchannel,0 , 10);
         assertEquals(10, bytesRead);
         assertEquals("more stuff", readFromFile(tmpFile, 10));
         assertTrue(decoder.isCompleted());
         
-        bytesRead = decoder.read(fchannel, 0, 1);
+        bytesRead = decoder.transfer(fchannel, 0, 1);
         assertEquals(0, bytesRead);
         assertTrue(decoder.isCompleted());
         

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java?rev=594061&r1=594060&r2=594061&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/test/java/org/apache/http/impl/nio/codecs/TestLengthDelimitedEncoder.java
Mon Nov 12 01:34:55 2007
@@ -187,7 +187,7 @@
         
         FileChannel fchannel = new FileInputStream(tmpFile).getChannel();
         
-        encoder.write(fchannel, 0, 20);
+        encoder.transfer(fchannel, 0, 20);
         
         String s = baos.toString("US-ASCII");
         
@@ -219,7 +219,7 @@
         
         FileChannel fchannel = new FileInputStream(tmpFile).getChannel();
         
-        encoder.write(fchannel, 0, 20);
+        encoder.transfer(fchannel, 0, 20);
                 
         encoder.write(wrap("more stuff"));
         
@@ -253,7 +253,7 @@
         
         try {
             FileChannel fchannel = new FileInputStream(tmpFile).getChannel();
-            encoder.write(fchannel, 0, 10);
+            encoder.transfer(fchannel, 0, 10);
             fail("IllegalStateException should have been thrown");
         } catch (IllegalStateException ex) {
             // ignore
@@ -284,7 +284,7 @@
         
         FileChannel fchannel = new FileInputStream(tmpFile).getChannel();
         
-        encoder.write(fchannel, 0, 20);
+        encoder.transfer(fchannel, 0, 20);
         
         String s = baos.toString("US-ASCII");
         



Mime
View raw message