jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java
changeset 6117 471ae95609d5
parent 5784 e565c553e9fc
child 7668 d4a77089c587
--- a/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java	Wed Jul 21 13:52:38 2010 +0100
+++ b/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java	Wed Jul 21 18:08:46 2010 +0100
@@ -336,7 +336,12 @@
     }
 
     public void sendUrgentData(int data) throws IOException {
-        throw new SocketException("Urgent data not supported");
+        synchronized (sc.blockingLock()) {
+            if (!sc.isBlocking())
+                throw new IllegalBlockingModeException();
+            int n = sc.sendOutOfBandData((byte)data);
+            assert n == 1;
+        }
     }
 
     public void setOOBInline(boolean on) throws SocketException {