Home
last modified time | relevance | path

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

12345

/libcore/luni/src/main/java/libcore/io/
DForwardingOs.java63 private final Os os; field in ForwardingOs
74 protected ForwardingOs(@NonNull Os os) { in ForwardingOs() argument
75 this.os = Objects.requireNonNull(os); in ForwardingOs()
84 return os; in delegate()
91 …SocketAddress peerAddress) throws ErrnoException, SocketException { return os.accept(fd, peerAddre… in accept()
128 …public boolean access(@Nullable String path, int mode) throws ErrnoException { return os.access(pa… in access()
133 …String node, StructAddrinfo hints, int netId) throws GaiException { return os.android_getaddrinfo(… in android_getaddrinfo()
138 …d, InetAddress address, int port) throws ErrnoException, SocketException { os.bind(fd, address, po… in bind()
143 …criptor fd, SocketAddress address) throws ErrnoException, SocketException { os.bind(fd, address); } in bind()
150 return os.capget(hdr); in capget()
[all …]
DIoBridge.java106 int available = Libcore.os.ioctlInt(fd, FIONREAD); in available()
145 Libcore.os.bind(fd, address, port); in bind()
201 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
218 Libcore.os.connect(fd, inetAddress, port); in connectErrno()
311 Libcore.os.close(oldFd); in closeAndSignalBlockedThreads()
326 int rc = Libcore.os.poll(pollFds, remainingTimeoutMs); in isConnected()
330 int connectError = Libcore.os.getsockoptInt(fd, SOL_SOCKET, SO_ERROR); in isConnected()
378 return Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF); in getSocketOptionErrno()
384 return !booleanFromInt(Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP)); in getSocketOptionErrno()
388 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.java54 FileDescriptor fd = Libcore.os.open(path, O_RDONLY, 0); in mmapRO()
56 long size = Libcore.os.fstat(fd).st_size; in mmapRO()
57 long address = Libcore.os.mmap(0L, size, PROT_READ, MAP_SHARED, fd, 0); in mmapRO()
60 Libcore.os.close(fd); in mmapRO()
75 Libcore.os.munmap(address, size); in close()
/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.java32 private OutputStream os; field in FilterOutputStreamTest
47 os = new FilterOutputStream(bos); in test_ConstructorLjava_io_OutputStream()
48 os.write('t'); in test_ConstructorLjava_io_OutputStream()
56 os = new FilterOutputStream(bos); in test_close()
57 os.write(fileString.getBytes(), 0, 500); in test_close()
58 os.flush(); in test_close()
60 os.close(); in test_close()
91 os = new FilterOutputStream(bos); in test_flush()
92 os.write(fileString.getBytes(), 0, 500); in test_flush()
93 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 …]
/libcore/luni/src/main/java/android/system/
DOs.java57 …dress peerAddress) throws ErrnoException, SocketException { return Libcore.os.accept(fd, peerAddre… in accept()
62 …public static boolean access(String path, int mode) throws ErrnoException { return Libcore.os.acce… in access()
65 …ode, StructAddrinfo hints, int netId) throws GaiException { return Libcore.os.android_getaddrinfo(… in android_getaddrinfo()
70 …ddress address, int port) throws ErrnoException, SocketException { Libcore.os.bind(fd, address, po… in bind()
75 …ull SocketAddress address) throws ErrnoException, SocketException { Libcore.os.bind(fd, address); } in bind()
89 return Libcore.os.capget(hdr); in capget()
113 Libcore.os.capset(hdr, data); in capset()
119 …public static void chmod(String path, int mode) throws ErrnoException { Libcore.os.chmod(path, mod… in chmod()
124 …public static void chown(String path, int uid, int gid) throws ErrnoException { Libcore.os.chown(p… in chown()
129 public static void close(FileDescriptor fd) throws ErrnoException { Libcore.os.close(fd); } in close()
[all …]
/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/tools/testmapping/
Dsave_logs.py22 import os
29 LOGS_ROOT = os.path.join(ANDROID_REPOSITORY_ROOT, 'out', 'host', 'linux-x86',
31 CTS_LOGS_PATTERN = os.path.join(LOGS_ROOT, '*', '*',
33 LIBCORE_DIR = os.path.join(ANDROID_REPOSITORY_ROOT, 'libcore')
34 DESTINATION_DIR = os.path.join(LIBCORE_DIR, 'smoketest')
39 if not os.path.isdir(LIBCORE_DIR):
41 if not os.path.isdir(DESTINATION_DIR):
44 os.mkdir(DESTINATION_DIR, 0o755)
69 return sorted(sources, key=os.path.getmtime, reverse=True)
74 return os.path.relpath(source, LOGS_ROOT)
[all …]
Dutil.py18 import os
23 if 'ANDROID_BUILD_TOP' not in os.environ:
25 return os.environ['ANDROID_BUILD_TOP']
30 relative_path = os.path.relpath(filename)
/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 …]
/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-diff58 import os
59 import os.path
66 ext = os.path.splitext(rel_path)[-1]
103 android_build_top = os.environ['ANDROID_BUILD_TOP']
106 ojluni_upstreams = os.environ['OJLUNI_UPSTREAMS']
127 upstreams = os.environ['OJLUNI_UPSTREAMS']
130 [d for d in os.listdir(upstreams) if os.path.isdir(os.path.join(upstreams, d))]
Dmerge-from-upstream86 import os
87 import os.path
111 if key not in os.environ:
118 upstreams = os.environ['OJLUNI_UPSTREAMS']
123 android_build_top = os.environ['ANDROID_BUILD_TOP']
130 if os.path.isfile(src):
131 if os.path.exists(dst) and os.path.isfile(dst):
132 os.remove(dst)
238 if not os.path.lexists(resolve_dir):
246 if not os.path.lexists(resolve_dir):
[all …]
/libcore/ojluni/src/tools/build/tools/java.nio-generator/
Dgen_java_nio.py38 import os.path
179 template_file = os.path.join(input_dir, template_name)
180 …output_file = os.path.join(output_dir, output_name + buffer_prefix + "Buffer" + byte_order + ".jav…
181 …output_file_r = os.path.join(output_dir, output_name + buffer_prefix + "BufferR" + byte_order + ".…
200 …bin_ops = os.path.join(template_dir, "X-Buffer-bin.java.template") if primitive == PRIMITIVE_BYTE …
202 template_file = os.path.join(template_dir, "X-Buffer.java.template")
203 output_file = os.path.join(output_dir, buffer_prefix + "Buffer.java")
211 template_file = os.path.join(template_dir, "Heap-X-Buffer.java.template")
212 output_file = os.path.join(output_dir, "Heap" + buffer_prefix + "Buffer.java")
213 output_file_r = os.path.join(output_dir, "Heap" + buffer_prefix + "BufferR.java")
[all …]
/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()

12345