Home
last modified time | relevance | path

Searched refs:fos (Results 1 – 25 of 41) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileOutputStreamTest.java37 private FileOutputStream fos; field in FileOutputStreamTest
64 if (fos != null) { in tearDown()
65 fos.close(); in tearDown()
74 fos = new FileOutputStream(f); in test_ConstructorLjava_io_File()
83 fos = new FileOutputStream(fileName); in test_ConstructorLjava_io_FileDescriptor()
84 fos.write('l'); in test_ConstructorLjava_io_FileDescriptor()
85 fos.close(); in test_ConstructorLjava_io_FileDescriptor()
87 fos = new FileOutputStream(fis.getFD()); in test_ConstructorLjava_io_FileDescriptor()
88 fos.close(); in test_ConstructorLjava_io_FileDescriptor()
98 fos = new FileOutputStream(fileName); in test_ConstructorLjava_lang_String()
[all …]
DFileDescriptorTest.java34 FileOutputStream fos = null; in test_sync() local
39 fos = new FileOutputStream(f.getAbsolutePath()); in test_sync()
40 fos.write("Test String".getBytes(StandardCharsets.US_ASCII)); in test_sync()
43 FileDescriptor fd = fos.getFD(); in test_sync()
58 if (fos != null) { in test_sync()
59 fos.close(); in test_sync()
76 FileOutputStream fos = null; in test_valid() local
78 fos = new FileOutputStream(f.getAbsolutePath()); in test_valid()
79 FileDescriptor fd = fos.getFD(); in test_valid()
81 fos.close(); in test_valid()
[all …]
DFileWriterTest.java35 private FileOutputStream fos; field in FileWriterTest
42 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_io_File()
43 fos.write("Test String".getBytes()); in test_ConstructorLjava_io_File()
44 fos.close(); in test_ConstructorLjava_io_File()
98 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_io_FileDescriptor()
99 fos.write("Test String".getBytes()); in test_ConstructorLjava_io_FileDescriptor()
100 fos.close(); in test_ConstructorLjava_io_FileDescriptor()
115 fos = new FileOutputStream(f.getPath()); in test_ConstructorLjava_lang_String()
116 fos.write("Test String".getBytes()); in test_ConstructorLjava_lang_String()
117 fos.close(); in test_ConstructorLjava_lang_String()
[all …]
DSyncFailedExceptionTest.java35 FileOutputStream fos = new FileOutputStream(f.getAbsolutePath()); in test_ConstructorLjava_lang_String() local
36 FileDescriptor fd = fos.getFD(); in test_ConstructorLjava_lang_String()
37 fos.close(); in test_ConstructorLjava_lang_String()
DFileTest.java305 FileOutputStream fos = new FileOutputStream(f); in test_canRead() local
306 fos.close(); in test_canRead()
320 FileOutputStream fos = new FileOutputStream(f); in test_canWrite() local
321 fos.close(); in test_canWrite()
627 FileOutputStream fos = new FileOutputStream(f); in test_delete() local
628 fos.close(); in test_delete()
696 FileOutputStream fos = new FileOutputStream(f); in test_exists() local
697 fos.close(); in test_exists()
775 FileOutputStream fos = new FileOutputStream(f); in test_getCanonicalFile() local
776 fos.close(); in test_getCanonicalFile()
[all …]
DOpenRandomFileTest.java40 FileOutputStream fos = new FileOutputStream(file); in testOpenNonEmptyFile() local
41 fos.write(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }); in testOpenNonEmptyFile()
42 fos.close(); in testOpenNonEmptyFile()
DRandomAccessFileTest.java211 FileOutputStream fos = new java.io.FileOutputStream(fileName); in test_read() local
212 fos.write(fileString.getBytes("UTF-8"), 0, fileString.length()); in test_read()
213 fos.close(); in test_read()
226 FileOutputStream fos = new java.io.FileOutputStream(fileName); in test_read$B() local
227 fos.write(fileString.getBytes(), 0, fileString.length()); in test_read$B()
228 fos.close(); in test_read$B()
245 FileOutputStream fos = new java.io.FileOutputStream(fileName); in test_read$BII() local
246 fos.write(fileString.getBytes(), 0, fileString.length()); in test_read$BII()
247 fos.close(); in test_read$BII()
894 FileOutputStream fos = new java.io.FileOutputStream(fileName); in test_read_$BII_IndexOutOfBoundsException() local
[all …]
DFileInputStreamTest.java98 FileOutputStream fos = null; in setUp() local
100 fos = new FileOutputStream(f.getAbsolutePath()); in setUp()
101 fos.write(INPUT.getBytes(StandardCharsets.US_ASCII)); in setUp()
103 fos.close(); in setUp()
122 FileOutputStream fos = new FileOutputStream(fileName); in test_ConstructorLjava_io_FileDescriptor() local
123 FileInputStream fis = new FileInputStream(fos.getFD()); in test_ConstructorLjava_io_FileDescriptor()
124 fos.close(); in test_ConstructorLjava_io_FileDescriptor()
DFilterInputStreamTest.java101 OutputStream fos = new FileOutputStream(temp.getAbsolutePath()); in setUp() local
102 fos.write(INPUT.getBytes(StandardCharsets.US_ASCII)); in setUp()
103 fos.close(); in setUp()
DOutputStreamWriterTest.java53 private ByteArrayOutputStream fos; field in OutputStreamWriterTest
66 fos = new ByteArrayOutputStream(); in setUp()
67 osw = new OutputStreamWriter(fos); in setUp()
557 osw = new OutputStreamWriter(fos, "8859_1"); in test_ConstructorLjava_io_OutputStreamLjava_lang_String()
559 osw = new OutputStreamWriter(fos, "Bogus"); in test_ConstructorLjava_io_OutputStreamLjava_lang_String()
637 osw = new OutputStreamWriter(fos, "8859_1"); in test_getEncoding()
699 isr = new InputStreamReader(new ByteArrayInputStream(fos.toByteArray())); in openInputStream()
/libcore/support/src/test/java/tests/util/
DFieldTestFileGenerator.java42 FileOutputStream fos = null; in main() local
57 fos = new FileOutputStream("testFields.ser"); in main()
58 oos = new ObjectOutputStream(fos); in main()
67 if (fos != null) fos.close(); in main()
72 fos = new FileOutputStream("testFieldsDeprecated.ser"); in main()
73 oos = new ObjectOutputStream(fos); in main()
82 if (fos != null) fos.close(); in main()
87 fos = new FileOutputStream("testFieldsDefaulted.ser"); in main()
88 oos = new ObjectOutputStream(fos); in main()
97 if (fos != null) fos.close(); in main()
/libcore/luni/src/test/java/libcore/java/io/
DFileOutputStreamTest.java69 … FileOutputStream fos = new FileOutputStream(File.createTempFile("FileOutputStreamTest", "tmp")); in testClose() local
72 fos.close(); in testClose()
73 fos.close(); in testClose()
75 fos.flush(); in testClose()
80 fos.write(bytes); in testClose()
85 fos.write(bytes, 0, 2); in testClose()
90 fos.write(42); in testClose()
96 fos.write(new byte[0], 0, 0); in testClose()
DFileInputStreamTest.java59 FileOutputStream fos = new FileOutputStream(mOutFd); in run() local
65 fos.write(buffer); in run()
67 TestIoUtils.closeQuietly(fos); in run()
110 FileOutputStream fos = new FileOutputStream(tmp); in makeFile() local
111 fos.write(1); in makeFile()
112 fos.write(1); in makeFile()
113 fos.close(); in makeFile()
280 try (FileOutputStream fos = new FileOutputStream(file)) { in allocateEmptyFile() argument
282 Os.posix_fallocate(fos.getFD(), 0, fileSize); in allocateEmptyFile()
289 try (FileOutputStream fos = new FileOutputStream(file)) { in allocateEmptyFile() argument
[all …]
DOldOutputStreamWriterTest.java36 private Support_OutputStream fos; field in OldOutputStreamWriterTest
42 fos = new Support_OutputStream(500); in setUp()
43 osw = new OutputStreamWriter(fos, "UTF-8"); in setUp()
91 osw = new OutputStreamWriter(fos, (String) null); in test_ConstructorLjava_io_OutputStreamLjava_lang_String()
98 osw = new OutputStreamWriter(fos, ""); in test_ConstructorLjava_io_OutputStreamLjava_lang_String()
105 osw = new OutputStreamWriter(fos, "Bogus"); in test_ConstructorLjava_io_OutputStreamLjava_lang_String()
112 osw = new OutputStreamWriter(fos, "8859_1"); in test_ConstructorLjava_io_OutputStreamLjava_lang_String()
177 fos.setThrowsException(true); in test_close()
259 fos.setThrowsException(true); in test_flush()
266 fos.setThrowsException(false); in test_flush()
[all …]
DOldFilterInputStreamTest.java296 java.io.OutputStream fos = new java.io.FileOutputStream(fileName); in setUp() local
297 fos.write(INPUT.getBytes()); in setUp()
298 fos.close(); in setUp()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/
DJarOutputStreamTest.java43 FileOutputStream fos = new FileOutputStream(fooJar); in test_JarOutputStreamLjava_io_OutputStreamLjava_util_jar_Manifest() local
51 fos.close(); in test_JarOutputStreamLjava_io_OutputStreamLjava_util_jar_Manifest()
53 new JarOutputStream(fos, man); in test_JarOutputStreamLjava_io_OutputStreamLjava_util_jar_Manifest()
60 new JarOutputStream(fos, null); in test_JarOutputStreamLjava_io_OutputStreamLjava_util_jar_Manifest()
70 FileOutputStream fos = new FileOutputStream(fooJar); in test_JarOutputStreamLjava_io_OutputStream() local
74 JarOutputStream joutFoo = new JarOutputStream(fos); in test_JarOutputStreamLjava_io_OutputStream()
81 fos.close(); in test_JarOutputStreamLjava_io_OutputStream()
84 JarOutputStream joutFoo = new JarOutputStream(fos); in test_JarOutputStreamLjava_io_OutputStream()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DDeflaterOutputStreamTest.java94 FileOutputStream fos = new FileOutputStream(f1); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Deflater() local
99 dos = new MyDeflaterOutputStream(fos, defl); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Deflater()
104 dos = new MyDeflaterOutputStream(fos, defl); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_Deflater()
121 FileOutputStream fos = new FileOutputStream(f1); in test_ConstructorLjava_io_OutputStream() local
122 MyDeflaterOutputStream dos = new MyDeflaterOutputStream(fos); in test_ConstructorLjava_io_OutputStream()
144 FileOutputStream fos = new FileOutputStream(f1); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_DeflaterI() local
150 dos = new MyDeflaterOutputStream(fos, defl, buf); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_DeflaterI()
158 dos = new MyDeflaterOutputStream(fos, defl, negBuf); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_DeflaterI()
165 dos = new MyDeflaterOutputStream(fos, defl, zeroBuf); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_DeflaterI()
172 dos = new MyDeflaterOutputStream(fos, defl, buf); in test_ConstructorLjava_io_OutputStreamLjava_util_zip_DeflaterI()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DGenericSignatureFormatErrorTest.java59 OutputStream fos = new FileOutputStream(tf); in test_signatureFormatError() local
60 copy(is, fos); in test_signatureFormatError()
61 fos.flush(); in test_signatureFormatError()
62 fos.close(); in test_signatureFormatError()
/libcore/luni/src/test/java/libcore/dalvik/system/
DBlockGuardTest.java113 try (FileOutputStream fos = new FileOutputStream(tmpFile)) { in testFileInputStream() argument
114 fos.write("01234567890".getBytes()); in testFileInputStream()
149 FileOutputStream fos = new FileOutputStream(f); in testFileOutputStream() local
152 fos.write(new byte[3]); in testFileOutputStream()
155 fos.write(4); in testFileOutputStream()
158 fos.flush(); in testFileOutputStream()
161 fos.close(); in testFileOutputStream()
196 try (FileOutputStream fos = new FileOutputStream(f)) { in testUnbufferedIO() argument
200 fos.write("a".getBytes()); in testUnbufferedIO()
/libcore/luni/src/test/java/libcore/java/nio/channels/
DFileChannelTest.java123 FileOutputStream fos = new FileOutputStream(tmp, true); in test_append() local
124 FileChannel fc = fos.getChannel(); in test_append()
132 fos.close(); in test_append()
243 FileOutputStream fos = new FileOutputStream(tmp); in test_close_fromFileDescriptor() local
244 FileDescriptor fd = fos.getFD(); in test_close_fromFileDescriptor()
253 fos.close(); in test_close_fromFileDescriptor()
274 try (FileOutputStream fos = new FileOutputStream(tmpFile)) { in test_closeGuardSupport_open_with_append() argument
275 try (FileChannel fc = fos.getChannel()) { in test_closeGuardSupport_open_with_append()
283 FileOutputStream fos = new FileOutputStream(tmp, true); in createFileContainingBytes() local
284 FileChannel fc = fos.getChannel(); in createFileContainingBytes()
DFileIOInterruptTest.java143 FileOutputStream fos = new FileOutputStream(fifoFile); in testStreamWrite_exceptionWhenAlreadyClosed() local
145 fos.close(); in testStreamWrite_exceptionWhenAlreadyClosed()
148 fos.write(buffer); in testStreamWrite_exceptionWhenAlreadyClosed()
162 FileOutputStream fos = new FileOutputStream(fifoFile); in testStreamWrite_exceptionOnCloseWhenBlocked() local
163 StreamWriter streamWriter = new StreamWriter(fos); in testStreamWrite_exceptionOnCloseWhenBlocked()
170 fos.close(); in testStreamWrite_exceptionOnCloseWhenBlocked()
357 FileOutputStream fos = new FileOutputStream(fifoFile); in testChannelWrite_exceptionWhenAlreadyInterrupted() local
358 FileChannel fileInputChannel = fos.getChannel(); in testChannelWrite_exceptionWhenAlreadyInterrupted()
639 private FileOutputStream fos; field in FileIOInterruptTest.FifoWriter
649 fos = new FileOutputStream(file); in run()
[all …]
/libcore/luni/src/test/java/libcore/java/util/zip/
DOldZipFileTest.java149 FileOutputStream fos = new FileOutputStream(tempFile); in setUp() local
151 fos.write(rbuf, 0, rbuf.length); in setUp()
153 fos.close(); in setUp()
DZipFileTest.java101 FileOutputStream fos = new FileOutputStream(tempFile)) { in test_zipFileWith_cp1251_fileNames()
107 fos.write(arr, 0, read); in test_zipFileWith_cp1251_fileNames()
109 fos.flush(); in test_zipFileWith_cp1251_fileNames()
/libcore/luni/src/test/java/libcore/java/util/jar/
DOldManifestTest.java125 FileOutputStream fos = new FileOutputStream(f); in test_writeLjava_io_OutputStream() local
126 fos.close(); in test_writeLjava_io_OutputStream()
128 manifest1.write(fos); in test_writeLjava_io_OutputStream()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyStoreBuilderTest.java496 FileOutputStream fos = null; in createKS() local
502 fos = new FileOutputStream(ff); in createKS()
504 ks.store(fos, pass); in createKS()
506 if (fos != null) { in createKS()
508 fos.close(); in createKS()

12