/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | SocketChannelTest.java | 57 SocketChannel sc = SocketChannel.open(ss.getLocalSocketAddress()); in test_read_intoReadOnlyByteArrays() local 59 sc.read(readOnly); in test_read_intoReadOnlyByteArrays() 64 sc.read(new ByteBuffer[] { readOnly }); in test_read_intoReadOnlyByteArrays() 69 sc.read(new ByteBuffer[] { readOnly }, 0, 1); in test_read_intoReadOnlyByteArrays() 79 SocketChannel sc = SocketChannel.open(); in test_56684() local 80 sc.configureBlocking(false); in test_56684() 83 SelectionKey selectionKey = sc.register(selector, SelectionKey.OP_CONNECT); in test_56684() 86 sc.connect(new InetSocketAddress(InetAddress.getByAddress(new byte[] { 0, 0, 0, 0 }), 0)); in test_56684() 92 sc.finishConnect(); in test_56684() 102 SocketChannel sc = SocketChannel.open(ss.getLocalSocketAddress()); in test_channelSocketOutputStreamClosureState() local [all …]
|
D | SelectorTest.java | 43 SocketChannel sc = SocketChannel.open(); in testNonBlockingConnect_immediate() local 44 sc.configureBlocking(false); in testNonBlockingConnect_immediate() 45 sc.connect(ssc.socket().getLocalSocketAddress()); in testNonBlockingConnect_immediate() 46 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT); in testNonBlockingConnect_immediate() 49 sc.finishConnect(); in testNonBlockingConnect_immediate() 61 SocketChannel sc = SocketChannel.open(); in testNonBlockingConnect_slow() local 62 sc.configureBlocking(false); in testNonBlockingConnect_slow() 63 sc.connect(ss.getLocalSocketAddress()); in testNonBlockingConnect_slow() 64 SelectionKey key = sc.register(selector, SelectionKey.OP_CONNECT); in testNonBlockingConnect_slow() 67 sc.finishConnect(); in testNonBlockingConnect_slow() [all …]
|
D | OldSocketChannelTest.java | 300 SocketChannel sc = SocketChannel.open(); in test_socketChannel_read_DirectByteBuffer() local 301 sc.connect(ssc.socket().getLocalSocketAddress()); in test_socketChannel_read_DirectByteBuffer() 305 sc.read(buf); in test_socketChannel_read_DirectByteBuffer() 308 sc.read(buf); in test_socketChannel_read_DirectByteBuffer() 309 sc.close(); in test_socketChannel_read_DirectByteBuffer() 316 sc = SocketChannel.open(); in test_socketChannel_read_DirectByteBuffer() 317 sc.connect(ssc.socket().getLocalSocketAddress()); in test_socketChannel_read_DirectByteBuffer() 321 sc.read(buf); in test_socketChannel_read_DirectByteBuffer() 324 sc.read(buf); in test_socketChannel_read_DirectByteBuffer() 325 sc.close(); in test_socketChannel_read_DirectByteBuffer()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLSessionContextTest.java | 25 SSLSessionContext sc = context in test_sessionCacheSize() local 27 sc.setSessionCacheSize(10); in test_sessionCacheSize() 28 assertEquals("10 wasn't returned", 10, sc.getSessionCacheSize()); in test_sessionCacheSize() 29 sc.setSessionCacheSize(5); in test_sessionCacheSize() 30 assertEquals("5 wasn't returned", 5, sc.getSessionCacheSize()); in test_sessionCacheSize() 33 sc.setSessionCacheSize(-1); in test_sessionCacheSize() 49 SSLSessionContext sc = context in test_sessionTimeout() local 51 sc.setSessionTimeout(100); in test_sessionTimeout() 52 assertEquals("100 wasn't returned", 100, sc.getSessionTimeout()); in test_sessionTimeout() 53 sc.setSessionTimeout(5000); in test_sessionTimeout() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/spi/ |
D | AbstractSelectableChannelTest.java | 112 SocketChannel sc = SocketChannel.open(); in test_register_LSelectorILObject() local 113 sc.configureBlocking(false); in test_register_LSelectorILObject() 114 SelectionKey acceptKey = sc.register(acceptSelector1, in test_register_LSelectorILObject() 118 assertSame(sc, acceptKey.channel()); in test_register_LSelectorILObject() 121 acceptKey = sc.register(acceptSelector2, SelectionKey.OP_READ, null); in test_register_LSelectorILObject() 211 SocketChannel sc = SocketChannel.open(); in test_register_LSelectorILObject_IllegalArgument() local 212 sc.configureBlocking(false); in test_register_LSelectorILObject_IllegalArgument() 214 sc.register(null, SelectionKey.OP_READ, argObj); in test_register_LSelectorILObject_IllegalArgument() 235 SocketChannel sc = SocketChannel.open(); in test_keyfor_LSelector() local 237 sc.configureBlocking(false); in test_keyfor_LSelector() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | SelectorTest.java | 116 SocketChannel sc = SocketChannel.open(); in test_keys() local 117 sc.configureBlocking(false); in test_keys() 118 SelectionKey key3 = sc.register(selector, SelectionKey.OP_READ); in test_keys() 151 SocketChannel sc = SocketChannel.open(); in test_selectedKeys() local 155 sc.connect(localAddress); in test_selectedKeys() 188 sc.close(); in test_selectedKeys() 337 SocketChannel sc = SocketChannel.open(); 338 sc.configureBlocking(false); 339 SelectionKey key2 = sc.register(selector, SelectionKey.OP_READ); 394 SocketChannel sc = SocketChannel.open(); [all …]
|
D | SelectionKeyTest.java | 36 SocketChannel sc; field in SelectionKeyTest 45 sc = SocketChannel.open(); in setUp() 46 sc.configureBlocking(false); in setUp() 47 selectionKey = sc.register(selector, SelectionKey.OP_CONNECT); in setUp() 127 assertSame(sc, selectionKey.channel()); in test_channel() 130 assertSame(sc, selectionKey.channel()); in test_channel() 155 selectionKey.interestOps(~sc.validOps()); in test_interestOpsI() 188 sc.close(); in test_isValid_ChannelColsed() 298 sc.connect(new InetSocketAddress(LOCAL_ADDR, ss.getLocalPort())); in test_readyOps()
|
D | SinkChannelTest.java | 467 SocketChannel sc = SocketChannel.open(); in test_socketChannel_read_close() local 470 sc.write(buf); in test_socketChannel_read_close() 475 sc.connect(new InetSocketAddress(InetAddress.getLocalHost(),49999)); in test_socketChannel_read_close() 478 sc.close(); in test_socketChannel_read_close() 480 sc.write(buf); in test_socketChannel_read_close() 491 SocketChannel sc = SocketChannel.open(); in test_socketChannel_read_write() local 492 sc.connect(new InetSocketAddress(InetAddress.getLocalHost(),49999)); in test_socketChannel_read_write() 496 sc.write(buf,0,2); in test_socketChannel_read_write() 501 sc.close(); in test_socketChannel_read_write()
|
D | SocketChannelTest.java | 208 SocketChannel sc = SocketChannel.open(); in test_getLocalSocketAddress_afterClose() local 209 assertNull(sc.socket().getLocalSocketAddress()); in test_getLocalSocketAddress_afterClose() 212 sc.socket().bind(bindAddr); in test_getLocalSocketAddress_afterClose() 214 assertNotNull(sc.socket().getLocalSocketAddress()); in test_getLocalSocketAddress_afterClose() 216 sc.close(); in test_getLocalSocketAddress_afterClose() 218 assertFalse(sc.isOpen()); in test_getLocalSocketAddress_afterClose() 220 sc.socket().getLocalSocketAddress(); in test_getLocalSocketAddress_afterClose() 2641 MockSocketChannel sc = new MockSocketChannel(null); in test_read$LByteBuffer() local 2646 sc.read(byteBufferArray); in test_read$LByteBuffer() 2647 assertTrue(sc.isReadCalled); in test_read$LByteBuffer() [all …]
|
D | ChannelsTest.java | 592 SocketChannel sc = SocketChannel.open(); in test_newReader_LReadableByteChannel_LString() local 593 sc.connect(ssc.socket().getLocalSocketAddress()); in test_newReader_LReadableByteChannel_LString() 594 sc.configureBlocking(false); in test_newReader_LReadableByteChannel_LString() 595 assertFalse(sc.isBlocking()); in test_newReader_LReadableByteChannel_LString() 599 assertFalse(sc.isBlocking()); in test_newReader_LReadableByteChannel_LString() 601 Reader reader = Channels.newReader(sc, "UTF16"); in test_newReader_LReadableByteChannel_LString() 609 Channels.newInputStream(sc).read(); in test_newReader_LReadableByteChannel_LString() 614 sc.close(); in test_newReader_LReadableByteChannel_LString()
|
D | ServerSocketChannelTest.java | 667 ServerSocketChannel sc = ServerSocketChannel.open(); in test_accept_SOTIMEOUT() local 669 sc.socket().bind(null); in test_accept_SOTIMEOUT() 672 sc.configureBlocking(false); in test_accept_SOTIMEOUT() 674 ServerSocket ss = sc.socket(); in test_accept_SOTIMEOUT() 685 SocketChannel client = sc.accept(); in test_accept_SOTIMEOUT() 690 sc.close(); in test_accept_SOTIMEOUT()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | SerializationTest.java | 91 SerializableContainer sc = (SerializableContainer) SerializationTester.deserializeHex(s); in testDeserializeNullUnserializableField() local 92 assertNull(sc.unserializable); in testDeserializeNullUnserializableField() 112 SerializableContainer sc = new SerializableContainer(); in testSerializeUnserializableField() local 113 sc.unserializable = new WasSerializable(); in testSerializeUnserializableField() 115 SerializationTester.serializeHex(sc); in testSerializeUnserializableField()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
D | SecureCacheResponseTest.java | 35 SecureCacheResponse sc = new MockCacheResponse(); in testSecureCacheResponse() local 37 assertNull(sc.getCipherSuite()); in testSecureCacheResponse()
|
/libcore/luni/src/main/java/java/nio/ |
D | ServerSocketChannelImpl.java | 128 SocketChannel sc = channelImpl.accept(); in accept() local 129 if (sc == null) { in accept() 132 return sc.socket(); in accept()
|
/libcore/luni/src/main/java/java/util/concurrent/ |
D | ConcurrentHashMap.java | 1541 Node<K,V>[] tab; int sc; in initTable() local 1543 if ((sc = sizeCtl) < 0) in initTable() 1545 else if (U.compareAndSwapInt(this, SIZECTL, sc, -1)) { in initTable() 1548 int n = (sc > 0) ? sc : DEFAULT_CAPACITY; in initTable() 1552 sc = n - (n >>> 2); in initTable() 1555 sizeCtl = sc; in initTable() 1592 Node<K,V>[] tab, nt; int sc; in addCount() local 1593 while (s >= (long)(sc = sizeCtl) && (tab = table) != null && in addCount() 1595 if (sc < 0) { in addCount() 1596 if (sc == -1 || transferIndex <= transferOrigin || in addCount() [all …]
|
D | ForkJoinPool.java | 1380 int ps; long sc; in deregisterWorker() local 1383 sc = stealCount, in deregisterWorker() 1384 sc + w.nsteals)); in deregisterWorker() 1728 long sc; in awaitWork() local 1731 sc = stealCount, sc + ns)); in awaitWork()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | PrintStreamTest.java | 206 char[] sc = new char[4000]; in test_print$C() local 207 fileString.getChars(0, fileString.length(), sc, 0); in test_print$C() 208 os.print(sc); in test_print$C() 376 char[] sc = new char[4000]; in test_println$C() local 377 fileString.getChars(0, fileString.length(), sc, 0); in test_println$C() 378 os.println(sc); in test_println$C()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | SignatureTest.java | 88 MySignature sc = new MySignature(); in testClone() local 90 sc.clone(); in testClone()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | ScannerTest.java | 337 SocketChannel sc = SocketChannel.open(); in test_Constructor_LReadableByteChannel() local 338 sc.connect(ssc.socket().getLocalSocketAddress()); in test_Constructor_LReadableByteChannel() 339 sc.configureBlocking(false); in test_Constructor_LReadableByteChannel() 340 assertFalse(sc.isBlocking()); in test_Constructor_LReadableByteChannel() 344 assertFalse(sc.isBlocking()); in test_Constructor_LReadableByteChannel() 346 Scanner s = new Scanner(sc); in test_Constructor_LReadableByteChannel() 353 sc.close(); in test_Constructor_LReadableByteChannel()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | URLConnectionTest.java | 1577 SSLContext sc = SSLContext.getInstance("TLS"); 1578 sc.init(null, new TrustManager[] { trustManager }, new java.security.SecureRandom()); 1583 HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
|