Home
last modified time | relevance | path

Searched refs:ds (Results 1 – 9 of 9) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DDatagramSocketTest.java105 try (DatagramSocket ds = new DatagramSocket()) { in test_Constructor() argument
108 boolean multicastAllEnabled = Libcore.os.getsockoptInt(ds.getFileDescriptor$(), in test_Constructor()
118 DatagramSocket ds = new DatagramSocket(0); in test_ConstructorI() local
119 ds.close(); in test_ConstructorI()
126 try (DatagramSocket ds = new DatagramSocket(0, InetAddress.getLocalHost())) { in test_ConstructorILjava_net_InetAddress() argument
127 assertTrue("Created socket with incorrect port", ds.getLocalPort() != 0); in test_ConstructorILjava_net_InetAddress()
129 .getLocalHost(), ds.getLocalAddress()); in test_ConstructorILjava_net_InetAddress()
137 DatagramSocket ds = new DatagramSocket(0); in test_close() local
140 ds.close(); in test_close()
142 ds.send(dp); in test_close()
[all …]
/libcore/luni/src/test/java/libcore/java/net/
DDatagramSocketTest.java39 DatagramSocket ds = new DatagramSocket(); in testInitialState() local
41 assertTrue(ds.isBound()); in testInitialState()
42 assertTrue(ds.getBroadcast()); // The RI starts DatagramSocket in broadcast mode. in testInitialState()
43 assertFalse(ds.isClosed()); in testInitialState()
44 assertFalse(ds.isConnected()); in testInitialState()
45 assertTrue(ds.getLocalPort() > 0); in testInitialState()
46 assertTrue(ds.getLocalAddress().isAnyLocalAddress()); in testInitialState()
47 InetSocketAddress socketAddress = (InetSocketAddress) ds.getLocalSocketAddress(); in testInitialState()
48 assertEquals(ds.getLocalPort(), socketAddress.getPort()); in testInitialState()
49 assertEquals(ds.getLocalAddress(), socketAddress.getAddress()); in testInitialState()
[all …]
DMulticastSocketTest.java48 DatagramSocket ds = new DatagramSocket()) { in testGroupReceive()
57 ds.send(p); in testGroupReceive()
61 ds.send(p); in testGroupReceive()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixSecureDirectoryStream.java48 private final UnixDirectoryStream ds; field in UnixSecureDirectoryStream
63 this.ds = new UnixDirectoryStream(dir, dp, filter); in UnixSecureDirectoryStream()
75 ds.writeLock().lock(); in close()
77 if (ds.closeImpl()) { in close()
81 ds.writeLock().unlock(); in close()
89 return ds.iterator(this); in iterator()
109 UnixPath child = ds.directory().resolve(file); in newDirectoryStream()
118 ds.readLock().lock(); in newDirectoryStream()
120 if (!ds.isOpen()) in newDirectoryStream()
145 ds.readLock().unlock(); in newDirectoryStream()
[all …]
DUnixDirectoryStream.java124 protected final Iterator<Path> iterator(DirectoryStream<Path> ds) { in iterator() argument
131 iterator = new UnixDirectoryIterator(ds); in iterator()
/libcore/ojluni/src/test/java/util/stream/
DTestDoubleSumAverage.java52 Supplier<DoubleStream> ds = () -> DoubleStream.iterate(0.0, e -> 0.0).limit(10); in testZeroAverageOfNonEmptyStream() local
54 return compareUlpDifference(0.0, ds.get().average().getAsDouble(), 0); in testZeroAverageOfNonEmptyStream()
77 Supplier<DoubleStream> ds = () -> DoubleStream.iterate(base, e -> increment).limit(count); in testForCompenstation() local
79 DoubleSummaryStatistics stats = ds.get().collect(DoubleSummaryStatistics::new, in testForCompenstation()
87 ds.get().sum(), 3); in testForCompenstation()
89 ds.get().average().getAsDouble(), 3); in testForCompenstation()
92ds.get().boxed().collect(Collectors.summingDouble(d -> d)), 3); in testForCompenstation()
94ds.get().boxed().collect(Collectors.averagingDouble(d -> d)),3); in testForCompenstation()
125 Supplier<DoubleStream> ds = testCase.getKey(); in testNonfiniteSum() local
128 DoubleSummaryStatistics stats = ds.get().collect(DoubleSummaryStatistics::new, in testNonfiniteSum()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/channels/
DDatagramChannelTest.java49 try (DatagramSocket ds = new DatagramSocket(0); in test_read_intoReadOnlyByteArrays() argument
51 dc.connect(ds.getLocalSocketAddress()); in test_read_intoReadOnlyByteArrays()
/libcore/ojluni/src/main/java/java/nio/file/
DFiles.java3451 DirectoryStream<Path> ds = Files.newDirectoryStream(dir);
3453 final Iterator<Path> delegate = ds.iterator();
3476 .onClose(asUncheckedRunnable(ds));
3479 ds.close();
/libcore/luni/src/test/java/libcore/android/system/
DOsTest.java1256 try (DatagramSocket ds = new DatagramSocket(); in test_recvfrom_EmptyPacket() argument
1258 srcSock.send(new DatagramPacket(new byte[0], 0, ds.getLocalSocketAddress())); in test_recvfrom_EmptyPacket()
1263 android.system.Os.recvfrom(ds.getFileDescriptor$(), recvBuf, 0, 16, 0, address); in test_recvfrom_EmptyPacket()