Home
last modified time | relevance | path

Searched refs:os (Results 1 – 25 of 111) sorted by relevance

12345

/libcore/luni/src/main/java/libcore/io/
DForwardingOs.java57 private final Os os; field in ForwardingOs
61 protected ForwardingOs(Os os) { in ForwardingOs() argument
62 this.os = Objects.requireNonNull(os); in ForwardingOs()
67 return os; in delegate()
70 …SocketAddress peerAddress) throws ErrnoException, SocketException { return os.accept(fd, peerAddre… in accept()
73 …public boolean access(String path, int mode) throws ErrnoException { return os.access(path, mode);… in access()
74 …String node, StructAddrinfo hints, int netId) throws GaiException { return os.android_getaddrinfo(… in android_getaddrinfo()
75 …d, InetAddress address, int port) throws ErrnoException, SocketException { os.bind(fd, address, po… in bind()
76 …criptor fd, SocketAddress address) throws ErrnoException, SocketException { os.bind(fd, address); } in bind()
79 return os.capget(hdr); in capget()
[all …]
DIoBridge.java66 Libcore.os.ioctlInt(fd, FIONREAD, available); in available()
105 Libcore.os.bind(fd, address, port); in bind()
157 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
174 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
253 Libcore.os.close(oldFd); in closeAndSignalBlockedThreads()
267 int rc = Libcore.os.poll(pollFds, remainingTimeoutMs); in isConnected()
271 int connectError = Libcore.os.getsockoptInt(fd, SOL_SOCKET, SO_ERROR); in isConnected()
313 return Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF); in getSocketOptionErrno()
319 return !booleanFromInt(Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP)); in getSocketOptionErrno()
323 return Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS); in getSocketOptionErrno()
[all …]
DLibcore.java39 public static volatile Os os = new BlockGuardOs(rawOs); field in Libcore
42 return os; in getOs()
51 if (os != expect) { in compareAndSetOs()
55 boolean result = (os == expect); in compareAndSetOs()
57 os = update; in compareAndSetOs()
DMemoryMappedFile.java56 FileDescriptor fd = Libcore.os.open(path, O_RDONLY, 0); in mmapRO()
58 long size = Libcore.os.fstat(fd).st_size; in mmapRO()
59 long address = Libcore.os.mmap(0L, size, PROT_READ, MAP_SHARED, fd, 0); in mmapRO()
62 Libcore.os.close(fd); in mmapRO()
77 Libcore.os.munmap(address, size); in close()
/libcore/luni/src/main/java/android/system/
DOs.java54 …dress peerAddress) throws ErrnoException, SocketException { return Libcore.os.accept(fd, peerAddre… in accept()
59 …public static boolean access(String path, int mode) throws ErrnoException { return Libcore.os.acce… in access()
62 …ode, StructAddrinfo hints, int netId) throws GaiException { return Libcore.os.android_getaddrinfo(… in android_getaddrinfo()
67 …ddress address, int port) throws ErrnoException, SocketException { Libcore.os.bind(fd, address, po… in bind()
72 …ull SocketAddress address) throws ErrnoException, SocketException { Libcore.os.bind(fd, address); } in bind()
81 return Libcore.os.capget(hdr); in capget()
92 Libcore.os.capset(hdr, data); in capset()
98 …public static void chmod(String path, int mode) throws ErrnoException { Libcore.os.chmod(path, mod… in chmod()
103 …public static void chown(String path, int uid, int gid) throws ErrnoException { Libcore.os.chown(p… in chown()
108 public static void close(FileDescriptor fd) throws ErrnoException { Libcore.os.close(fd); } in close()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DDataOutputStreamTest.java28 private DataOutputStream os; field in DataOutputStreamTest
49 os.writeInt(9087589); in test_flush()
50 os.flush(); in test_flush()
61 os.write(fileString.getBytes(), 0, 150); in test_size()
62 os.close(); in test_size()
67 assertEquals("Incorrect size returned", 150, os.size()); in test_size()
74 os.write(fileString.getBytes(), 0, 150); in test_write$BII()
75 os.close(); in test_write$BII()
88 os.write((int) 't'); in test_writeI()
89 os.close(); in test_writeI()
[all …]
DPrintStreamTest.java62 public MockPrintStream(OutputStream os) { in MockPrintStream() argument
63 super(os); in MockPrintStream()
81 PrintStream os = new PrintStream(testFilePath); in test_Constructor_Ljava_lang_String() local
82 os.print(UNICODE_STRING); in test_Constructor_Ljava_lang_String()
83 os.close(); in test_Constructor_Ljava_lang_String()
100 PrintStream os = new PrintStream(testFilePath, "utf-8"); in test_Constructor_Ljava_lang_String_Ljava_lang_String() local
101 os.print(UNICODE_STRING); in test_Constructor_Ljava_lang_String_Ljava_lang_String()
102 os.close(); in test_Constructor_Ljava_lang_String_Ljava_lang_String()
107 PrintStream os = new PrintStream(testFilePath, "utf-16"); in test_Constructor_Ljava_lang_String_Ljava_lang_String() local
108 os.print(UNICODE_STRING); in test_Constructor_Ljava_lang_String_Ljava_lang_String()
[all …]
DFilterOutputStreamTest.java30 private OutputStream os; field in FilterOutputStreamTest
45 os = new FilterOutputStream(bos); in test_ConstructorLjava_io_OutputStream()
46 os.write('t'); in test_ConstructorLjava_io_OutputStream()
54 os = new FilterOutputStream(bos); in test_close()
55 os.write(fileString.getBytes(), 0, 500); in test_close()
56 os.flush(); in test_close()
58 os.close(); in test_close()
66 os = new FilterOutputStream(bos); in test_flush()
67 os.write(fileString.getBytes(), 0, 500); in test_flush()
68 os.flush(); in test_flush()
[all …]
DDataInputStreamTest.java30 private DataOutputStream os; field in DataInputStreamTest
45 os.writeChar('t'); in test_ConstructorLjava_io_InputStream()
46 os.close(); in test_ConstructorLjava_io_InputStream()
57 os.write(fileString.getBytes()); in test_read$B()
58 os.close(); in test_read$B()
70 os.write(fileString.getBytes()); in test_read$BII()
71 os.close(); in test_read$BII()
83 os.writeBoolean(true); in test_readBoolean()
84 os.close(); in test_readBoolean()
93 os.writeByte((byte) 127); in test_readByte()
[all …]
DObjectOutputStream2Test.java49 ObjectOutputStream os = new ObjectOutputStream(bos); in test_writeReadEnum() local
50 os.writeObject(MyEnum.TWO); in test_writeReadEnum()
51 os.close(); in test_writeReadEnum()
/libcore/luni/src/test/java/libcore/java/io/
DOldDataOutputStreamTest.java30 private DataOutputStream os; field in OldDataOutputStreamTest
49 os = new DataOutputStream(buf); in test_flush()
50 os.writeInt(9087589); in test_flush()
53 os.flush(); in test_flush()
56 os.close(); in test_flush()
63 os = new DataOutputStream(sos); in test_flush()
65 os.flush(); in test_flush()
74 os.write(testString.getBytes(), 5, testLength - 7); in test_write$BII()
75 os.close(); in test_write$BII()
92 os.write(nullByteArray, 0, 1); in test_write$BII_Exception()
[all …]
DOldFilterOutputStreamTest.java28 private java.io.FilterOutputStream os; field in OldFilterOutputStreamTest
45 os = new FilterOutputStream(bos); in test_ConstructorLjava_io_OutputStream()
46 os.write('t'); in test_ConstructorLjava_io_OutputStream()
54 os = new FilterOutputStream(sos); in test_close()
55 os.close(); in test_close()
58 os.write(42); in test_close()
65 os.write(42); in test_close()
71 os = new FilterOutputStream(sos); in test_close()
73 os.close(); in test_close()
82 os = new FilterOutputStream(sos); in test_flush()
[all …]
DOldBufferedOutputStreamTest.java28 private java.io.OutputStream os; field in OldBufferedOutputStreamTest
41 os = new java.io.BufferedOutputStream(baos); in test_ConstructorLjava_io_OutputStream()
42 os.write(fileString.getBytes(), 0, 500); in test_ConstructorLjava_io_OutputStream()
53 os = new java.io.BufferedOutputStream(baos, -1); in test_ConstructorLjava_io_OutputStreamI()
59 os = new java.io.BufferedOutputStream(baos, 1024); in test_ConstructorLjava_io_OutputStreamI()
60 os.write(fileString.getBytes(), 0, 500); in test_ConstructorLjava_io_OutputStreamI()
68 os = new java.io.BufferedOutputStream(baos, 600); in test_flush()
69 os.write(fileString.getBytes(), 0, 500); in test_flush()
70 os.flush(); in test_flush()
73 os.close(); in test_flush()
[all …]
DOldDataInputOutputStreamTest.java29 private DataOutputStream os; field in OldDataInputOutputStreamTest
38 os.writeBoolean(true); in test_read_writeBoolean()
41 os.writeBoolean(false); in test_read_writeBoolean()
48 os.close(); in test_read_writeBoolean()
70 os.writeByte((byte) 127); in test_read_writeByte()
73 os.writeByte((byte) 127); in test_read_writeByte()
80 os.close(); in test_read_writeByte()
102 os.writeChar('b'); in test_read_writeChar()
105 os.writeChar('k'); in test_read_writeChar()
112 os.close(); in test_read_writeChar()
[all …]
DDataOutputStreamTest.java29 private DataOutputStream os = new DataOutputStream(bytes); field in DataOutputStreamTest
32 os.writeBoolean(true); in test_writeBoolean()
33 os.writeBoolean(false); in test_writeBoolean()
38 os.writeByte(-1); in test_writeByte()
39 os.writeByte(0); in test_writeByte()
40 os.writeByte(1); in test_writeByte()
41 os.writeByte(129); in test_writeByte()
43 os.writeByte(0x1234); in test_writeByte()
49 os.writeBytes("0\u12341"); in test_writeBytes()
55 os.writeChar('0'); in test_writeChar()
[all …]
DOldObjectInputOutputStreamTest.java28 private ObjectOutputStream os; field in OldObjectInputOutputStreamTest
37 os.writeBoolean(true); in test_read_writeBoolean()
39 os.close(); in test_read_writeBoolean()
61 os.writeByte((byte) 127); in test_read_writeByte()
63 os.close(); in test_read_writeByte()
85 os.writeChar('b'); in test_read_writeChar()
87 os.close(); in test_read_writeChar()
109 os.writeDouble(2345.76834720202); in test_read_writeDouble()
111 os.close(); in test_read_writeDouble()
133 os.writeFloat(29.08764f); in test_read_writeFloat()
[all …]
DOldDataInputStreamTest.java30 private DataOutputStream os; field in OldDataInputStreamTest
44 os.writeChar('t'); in test_ConstructorLjava_io_InputStream()
45 os.close(); in test_ConstructorLjava_io_InputStream()
63 os.write(fileString.getBytes()); in test_read$B()
64 os.close(); in test_read$B()
94 os.write(fileString.getBytes()); in test_read$BII()
95 os.close(); in test_read$BII()
124 os.write(fileString.getBytes()); in test_read$BII_Exception()
125 os.close(); in test_read$BII_Exception()
153 os.write(fileString.getBytes()); in test_readFully$B()
[all …]
DOutputStreamWriterTest.java34 FlushCountingOutputStream os = new FlushCountingOutputStream(); in testFlushCount() local
35 OutputStreamWriter writer = new OutputStreamWriter(os, "UTF-8"); in testFlushCount()
41 assertEquals(0, os.flushCount); in testFlushCount()
43 assertEquals(1, os.flushCount); in testFlushCount()
45 assertEquals(1, os.flushCount); in testFlushCount()
/libcore/luni/src/test/java/libcore/libcore/io/
DFdsanTest.java36 long tag = Libcore.os.android_fdsan_get_owner_tag(fd); in testFileInputStream()
38 assertEquals("FileInputStream", Libcore.os.android_fdsan_get_tag_type(tag)); in testFileInputStream()
39 assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag)); in testFileInputStream()
46 long tag = Libcore.os.android_fdsan_get_owner_tag(fd); in testFileOutputStream()
48 assertEquals("FileOutputStream", Libcore.os.android_fdsan_get_tag_type(tag)); in testFileOutputStream()
49 assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag)); in testFileOutputStream()
56 long tag = Libcore.os.android_fdsan_get_owner_tag(fd); in testRandomAccessFile()
58 assertEquals("RandomAccessFile", Libcore.os.android_fdsan_get_tag_type(tag)); in testRandomAccessFile()
59 assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag)); in testRandomAccessFile()
80 long tag = Libcore.os.android_fdsan_get_owner_tag(fd); in testParcelFileDescriptor()
[all …]
DForwardingOsTest.java46 ForwardingOs os = new ForwardingOs(mockOs) {}; in toStringContainsDelegate() local
49 assertTrue(os.toString(), os.toString().contains(msg)); in toStringContainsDelegate()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DInflaterOutputStreamTest.java36 private ByteArrayOutputStream os = new ByteArrayOutputStream(); field in InflaterOutputStreamTest
52 new InflaterOutputStream(os).close(); in test_ConstructorLjava_io_OutputStream()
67 new InflaterOutputStream(os, inflater).close(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater()
77 new InflaterOutputStream(os, null); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Inflater()
91 new InflaterOutputStream(os, inflater, 20).close(); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI()
108 new InflaterOutputStream(os, null, -1); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI()
122 new InflaterOutputStream(os, inflater, 0); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI()
129 new InflaterOutputStream(os, inflater, -10000); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_InflaterI()
142 InflaterOutputStream ios = new InflaterOutputStream(os); in test_close()
152 InflaterOutputStream ios = new InflaterOutputStream(os); in test_flush()
[all …]
/libcore/tools/upstream/
Dupstream-diff53 import os
54 import os.path
61 android_build_top = os.environ['ANDROID_BUILD_TOP']
63 ojluni_upstreams = os.environ['OJLUNI_UPSTREAMS']
85 upstreams = os.environ['OJLUNI_UPSTREAMS']
88 [d for d in os.listdir(upstreams) if os.path.isdir(os.path.join(upstreams, d))]
/libcore/ojluni/src/main/java/javax/crypto/
DCipherOutputStream.java91 public CipherOutputStream(OutputStream os, Cipher c) { in CipherOutputStream() argument
92 super(os); in CipherOutputStream()
93 output = os; in CipherOutputStream()
106 protected CipherOutputStream(OutputStream os) { in CipherOutputStream() argument
107 super(os); in CipherOutputStream()
108 output = os; in CipherOutputStream()
/libcore/ojluni/src/main/java/java/net/
DPlainSocketImpl.java180 Libcore.os.listen(fd, count); in socketListen()
201 FileDescriptor newfd = Libcore.os.accept(fd, peerAddress); in socketAccept()
237 Libcore.os.dup2(markerFD, fd.getInt$()); in socketClose0()
238 Libcore.os.close(markerFD); in socketClose0()
265 Libcore.os.socketpair(AF_UNIX, SOCK_STREAM, 0, fd1, fd2); in getMarkerFD()
268 Libcore.os.shutdown(fd1, SHUT_RDWR); in getMarkerFD()
269 Libcore.os.close(fd2); in getMarkerFD()
281 Libcore.os.shutdown(fd, howto); in socketShutdown()
307 Libcore.os.sendto(fd, buffer, 0, 1, MSG_OOB, null, 0); in socketSendUrgentData()
/libcore/luni/src/test/java/libcore/java/util/jar/
DOldJarOutputStreamTest.java34 OutputStream os = new FileOutputStream(outputJar); in test_putNextEntryLjava_util_zip_ZipEntry() local
35 JarOutputStream jout = new JarOutputStream(os, newman); in test_putNextEntryLjava_util_zip_ZipEntry()
36 os.close(); in test_putNextEntryLjava_util_zip_ZipEntry()

12345