Searched refs:os (Results 1 - 25 of 106) sorted by relevance

12345

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DDataOutputStreamTest.java28 private DataOutputStream os; field in class:DataOutputStreamTest
49 os.writeInt(9087589);
50 os.flush();
61 os.write(fileString.getBytes(), 0, 150);
62 os.close();
67 assertEquals("Incorrect size returned", 150, os.size());
74 os.write(fileString.getBytes(), 0, 150);
75 os.close();
88 os.write((int) 't');
89 os
[all...]
H A DFilterOutputStreamTest.java30 private OutputStream os; field in class:FilterOutputStreamTest
45 os = new FilterOutputStream(bos);
46 os.write('t');
54 os = new FilterOutputStream(bos);
55 os.write(fileString.getBytes(), 0, 500);
56 os.flush();
58 os.close();
66 os = new FilterOutputStream(bos);
67 os.write(fileString.getBytes(), 0, 500);
68 os
[all...]
H A DPrintStreamTest.java54 public MockPrintStream(OutputStream os) { argument
55 super(os);
73 MockPrintStream os = new MockPrintStream(testFilePath);
74 assertNotNull(os);
75 os.close();
82 MockPrintStream os = new MockPrintStream(testFilePath, "utf-8");
83 assertNotNull(os);
84 os.close();
100 PrintStream os = new PrintStream(bos);
101 os
[all...]
H A DDataInputStreamTest.java30 private DataOutputStream os; field in class:DataInputStreamTest
45 os.writeChar('t');
46 os.close();
57 os.write(fileString.getBytes());
58 os.close();
70 os.write(fileString.getBytes());
71 os.close();
83 os.writeBoolean(true);
84 os.close();
93 os
[all...]
H A DObjectOutputStream2Test.java49 ObjectOutputStream os = new ObjectOutputStream(bos);
50 os.writeObject(MyEnum.TWO);
51 os.close();
/libcore/luni/src/test/java/libcore/java/io/
H A DOldBufferedOutputStreamTest.java28 private java.io.OutputStream os; field in class:OldBufferedOutputStreamTest
41 os = new java.io.BufferedOutputStream(baos);
42 os.write(fileString.getBytes(), 0, 500);
53 os = new java.io.BufferedOutputStream(baos, -1);
59 os = new java.io.BufferedOutputStream(baos, 1024);
60 os.write(fileString.getBytes(), 0, 500);
68 os = new java.io.BufferedOutputStream(baos, 600);
69 os.write(fileString.getBytes(), 0, 500);
70 os.flush();
73 os
[all...]
H A DOldDataOutputStreamTest.java30 private DataOutputStream os; field in class:OldDataOutputStreamTest
49 os = new DataOutputStream(buf);
50 os.writeInt(9087589);
53 os.flush();
56 os.close();
63 os = new DataOutputStream(sos);
65 os.flush();
74 os.write(testString.getBytes(), 5, testLength - 7);
75 os.close();
92 os
[all...]
H A DOldFilterOutputStreamTest.java28 private java.io.FilterOutputStream os; field in class:OldFilterOutputStreamTest
45 os = new FilterOutputStream(bos);
46 os.write('t');
54 os = new FilterOutputStream(sos);
55 os.close();
58 os.write(42);
65 os.write(42);
71 os = new FilterOutputStream(sos);
73 os.close();
82 os
[all...]
H A DOldObjectInputOutputStreamTest.java28 private ObjectOutputStream os; field in class:OldObjectInputOutputStreamTest
37 os.writeBoolean(true);
39 os.close();
61 os.writeByte((byte) 127);
63 os.close();
85 os.writeChar('b');
87 os.close();
109 os.writeDouble(2345.76834720202);
111 os.close();
133 os
[all...]
H A DDataOutputStreamTest.java27 private DataOutputStream os = new DataOutputStream(bytes); field in class:DataOutputStreamTest
30 os.writeBoolean(true);
31 os.writeBoolean(false);
36 os.writeByte(-1);
37 os.writeByte(0);
38 os.writeByte(1);
39 os.writeByte(129);
41 os.writeByte(0x1234);
47 os.writeBytes("0\u12341");
53 os
[all...]
H A DOldDataInputOutputStreamTest.java29 private DataOutputStream os; field in class:OldDataInputOutputStreamTest
38 os.writeBoolean(true);
41 os.writeBoolean(false);
48 os.close();
70 os.writeByte((byte) 127);
73 os.writeByte((byte) 127);
80 os.close();
102 os.writeChar('b');
105 os.writeChar('k');
112 os
[all...]
H A DOldDataInputStreamTest.java30 private DataOutputStream os; field in class:OldDataInputStreamTest
44 os.writeChar('t');
45 os.close();
63 os.write(fileString.getBytes());
64 os.close();
94 os.write(fileString.getBytes());
95 os.close();
124 os.write(fileString.getBytes());
125 os.close();
153 os
[all...]
H A DOutputStreamWriterTest.java34 FlushCountingOutputStream os = new FlushCountingOutputStream();
35 OutputStreamWriter writer = new OutputStreamWriter(os, "UTF-8");
41 assertEquals(0, os.flushCount);
43 assertEquals(1, os.flushCount);
45 assertEquals(1, os.flushCount);
/libcore/luni/src/main/java/libcore/io/
H A DLibcore.java23 * Direct access to syscalls. Code should strongly prefer using {@link #os}
32 public static Os os = new BlockGuardOs(rawOs); field in class:Libcore
H A DForwardingOs.java50 protected final Os os; field in class:ForwardingOs
52 public ForwardingOs(Os os) { argument
53 this.os = os;
56 public FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException { return os.accept(fd, peerAddress); }
57 public boolean access(String path, int mode) throws ErrnoException { return os.access(path, mode); }
58 public InetAddress[] android_getaddrinfo(String node, StructAddrinfo hints, int netId) throws GaiException { return os.android_getaddrinfo(node, hints, netId); }
59 public void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { os.bind(fd, address, port); }
60 public void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException { os.bind(fd, address); }
63 return os
[all...]
H A DBlockGuardOs.java41 public BlockGuardOs(Os os) { argument
42 super(os);
64 final FileDescriptor acceptFd = os.accept(fd, peerAddress);
73 return os.access(path, mode);
78 os.chmod(path, mode);
83 os.chown(path, uid, gid);
108 os.close(fd);
112 return isInetDomain(Libcore.os.getsockoptInt(fd, SOL_SOCKET, SO_DOMAIN));
120 StructLinger linger = Libcore.os.getsockoptLinger(fd, SOL_SOCKET, SO_LINGER);
126 os
[all...]
H A DMemoryMappedFile.java54 FileDescriptor fd = Libcore.os.open(path, O_RDONLY, 0);
56 long size = Libcore.os.fstat(fd).st_size;
57 long address = Libcore.os.mmap(0L, size, PROT_READ, MAP_SHARED, fd, 0);
60 Libcore.os.close(fd);
75 Libcore.os.munmap(address, size);
H A DIoBridge.java61 Libcore.os.ioctlInt(fd, FIONREAD, available);
100 Libcore.os.bind(fd, address, port);
152 Libcore.os.connect(fd, inetAddress, port);
169 Libcore.os.connect(fd, inetAddress, port);
242 Libcore.os.close(oldFd);
254 int rc = Libcore.os.poll(pollFds, remainingTimeoutMs);
258 int connectError = Libcore.os.getsockoptInt(fd, SOL_SOCKET, SO_ERROR);
302 return Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF);
308 return !booleanFromInt(Libcore.os.getsockoptInt(fd, IPPROTO_IPV6, IPV6_MULTICAST_LOOP));
312 return Libcore.os
[all...]
H A DIoUtils.java43 Libcore.os.close(fd);
91 int flags = Libcore.os.fcntlVoid(fd, F_GETFL);
97 Libcore.os.fcntlInt(fd, F_SETFL, flags);
163 FileDescriptor fd = Libcore.os.open(path, O_RDONLY, 0);
164 Libcore.os.close(fd);
214 final StructStat stat = Libcore.os.fstat(fd);
234 while ((read = Libcore.os.read(fd, bytes, count, capacity - count)) != 0) {
/libcore/luni/src/test/java/libcore/io/
H A DOsTest.java55 assertFalse(S_ISSOCK(Libcore.os.fstat(fis.getFD()).st_mode));
59 assertTrue(S_ISSOCK(Libcore.os.fstat(s.getImpl().getFD$()).st_mode));
68 Libcore.os.fcntlInt(fis.getFD(), F_SETFD, FD_CLOEXEC);
69 int flags = Libcore.os.fcntlVoid(fis.getFD(), F_GETFD);
89 final FileDescriptor fd = Libcore.os.socket(AF_UNIX, SOCK_STREAM, 0);
92 Libcore.os.close(fd);
97 final FileDescriptor serverFd = Libcore.os.socket(AF_UNIX, SOCK_STREAM, 0);
98 Libcore.os.bind(serverFd, address);
99 Libcore.os.listen(serverFd, 5);
107 FileDescriptor clientFd = Libcore.os
[all...]
/libcore/luni/src/main/java/android/system/
H A DOs.java43 public static FileDescriptor accept(FileDescriptor fd, InetSocketAddress peerAddress) throws ErrnoException, SocketException { return Libcore.os.accept(fd, peerAddress); }
49 public static FileDescriptor accept(FileDescriptor fd, SocketAddress peerAddress) throws ErrnoException, SocketException { return Libcore.os.accept(fd, peerAddress); }
54 public static boolean access(String path, int mode) throws ErrnoException { return Libcore.os.access(path, mode); }
56 /** @hide */ public static InetAddress[] android_getaddrinfo(String node, StructAddrinfo hints, int netId) throws GaiException { return Libcore.os.android_getaddrinfo(node, hints, netId); }
61 public static void bind(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { Libcore.os.bind(fd, address, port); }
63 /** @hide */ public static void bind(FileDescriptor fd, SocketAddress address) throws ErrnoException, SocketException { Libcore.os.bind(fd, address); }
71 return Libcore.os.capget(hdr);
81 Libcore.os.capset(hdr, data);
87 public static void chmod(String path, int mode) throws ErrnoException { Libcore.os.chmod(path, mode); }
92 public static void chown(String path, int uid, int gid) throws ErrnoException { Libcore.os
[all...]
/libcore/ojluni/src/main/java/javax/crypto/
H A DCipherOutputStream.java88 * @param os the OutputStream object
91 public CipherOutputStream(OutputStream os, Cipher c) { argument
92 super(os);
93 output = os;
104 * @param os the OutputStream object
106 protected CipherOutputStream(OutputStream os) { argument
107 super(os);
108 output = os;
/libcore/tools/upstream/
H A Doj_upstream_comparison.py51 import os namespace
58 list_file = os.path.join(build_top, "libcore", "openjdk_java_files.mk")
67 path = os.path.normpath(path)
73 return os.path.join(build_top, "libcore", "ojluni", "src", "main", "java", rel_path)
82 source_dir = os.path.normpath(source_dir)
83 result = os.path.join(upstream_root, upstream, source_dir, rel_path)
84 if os.path.exists(result):
163 out_file = os.path.join(output_dir, rel_path)
164 out_dir = os.path.dirname(out_file)
165 if not os
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DInflaterOutputStreamTest.java36 private ByteArrayOutputStream os = new ByteArrayOutputStream(); field in class:InflaterOutputStreamTest
52 new InflaterOutputStream(os).close();
67 new InflaterOutputStream(os, inflater).close();
77 new InflaterOutputStream(os, null);
91 new InflaterOutputStream(os, inflater, 20).close();
108 new InflaterOutputStream(os, null, -1);
122 new InflaterOutputStream(os, inflater, 0);
129 new InflaterOutputStream(os, inflater, -10000);
142 InflaterOutputStream ios = new InflaterOutputStream(os);
152 InflaterOutputStream ios = new InflaterOutputStream(os);
[all...]
/libcore/luni/src/test/java/libcore/java/util/jar/
H A DOldJarOutputStreamTest.java34 OutputStream os = new FileOutputStream(outputJar);
35 JarOutputStream jout = new JarOutputStream(os, newman);
36 os.close();

Completed in 323 milliseconds

12345