harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r528383 - in /harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/net/SocketImpl.java test/java/tests/api/java/net/SocketImplTest.java
Date Fri, 13 Apr 2007 08:17:35 GMT
Author: pyang
Date: Fri Apr 13 01:17:34 2007
New Revision: 528383

URL: http://svn.apache.org/viewvc?view=rev&rev=528383
Log:
Apply patch for HARMONY-3644([classlib][luni]Delete two un-used read/write methods in SocketImpl)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java
    harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java?view=diff&rev=528383&r1=528382&r2=528383
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/SocketImpl.java Fri
Apr 13 01:17:34 2007
@@ -230,38 +230,6 @@
     protected abstract void listen(int backlog) throws IOException;
 
     /**
-     * In the IP stack, read at most <code>count</code> bytes off the socket
-     * into the <code>buffer</code>, at the <code>offset</code>.
If the
-     * timeout is zero, block indefinitely waiting for data, otherwise wait the
-     * specified period (in milliseconds).
-     * 
-     * @param buffer
-     *            the buffer to read into
-     * @param offset
-     *            the offset into the buffer
-     * @param count
-     *            the max number of bytes to read
-     * @return int the actual number of bytes read
-     * @exception IOException
-     *                thrown if an error occurs while reading
-     */
-    int read(byte[] buffer, int offset, int count) throws IOException {
-        if (shutdownInput) {
-            return -1;
-        }
-        try {
-            int read = this.netImpl.receiveStream(fd, buffer, offset, count,
-                    receiveTimeout);
-            if (read == -1) {
-                shutdownInput = true;
-            }
-            return read;
-        } catch (InterruptedIOException e) {
-            throw new SocketTimeoutException(e.getMessage());
-        }
-    }
-
-    /**
      * Set the nominated socket option.
      * 
      * @param optID

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java?view=diff&rev=528383&r1=528382&r2=528383
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketImplTest.java
Fri Apr 13 01:17:34 2007
@@ -55,7 +55,15 @@
             // expected
         }
     }
-
+    
+    /*
+     * @tests java.net.SocketImpl#shutdownOutput()
+     */
+    public void test_supportsUrgentData() {
+        MockSocketImpl s = new MockSocketImpl();
+        assertFalse(s.testSupportsUrgentData());
+    }
+    
 	// the mock class for test, leave all method empty
 	class MockSocketImpl extends SocketImpl{
 		
@@ -118,6 +126,11 @@
         public void shutdownOutput() throws IOException {
             super.shutdownOutput();
         }
+        
+        public boolean testSupportsUrgentData(){
+            return super.supportsUrgentData();
+        }
+        
 	}
 
 	protected void setUp() {



Mime
View raw message