Home
last modified time | relevance | path

Searched refs:fis (Results 1 – 25 of 43) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileInputStreamTest.java123 FileInputStream fis = new FileInputStream(fos.getFD()); in test_ConstructorLjava_io_FileDescriptor() local
125 fis.close(); in test_ConstructorLjava_io_FileDescriptor()
208 FileInputStream fis = new FileInputStream(fileName); in test_getFD() local
209 assertTrue("Returned invalid fd", fis.getFD().valid()); in test_getFD()
210 fis.close(); in test_getFD()
211 assertTrue("Returned invalid fd", !fis.getFD().valid()); in test_getFD()
400 FileInputStream fis = new FileInputStream(fileName); in test_regressionNNN() local
403 fis.read(new byte[1], -1, 1); in test_regressionNNN()
410 fis.read(new byte[1], 0, -1); in test_regressionNNN()
417 fis.read(new byte[1], 0, 5); in test_regressionNNN()
[all …]
DFileDescriptorTest.java35 FileInputStream fis = null; in test_sync() local
42 fis = new FileInputStream(f.getPath()); in test_sync()
47 assertEquals(length, fis.available()); in test_sync()
50 fd = fis.getFD(); in test_sync()
52 assertEquals(length, fis.available()); in test_sync()
61 if (fis != null) { in test_sync()
62 fis.close(); in test_sync()
DFileReaderTest.java35 FileInputStream fis; field in FileReaderTest
61 FileInputStream fis = new FileInputStream(f.getPath()); in test_ConstructorLjava_io_FileDescriptor() local
62 br = new FileReader(fis.getFD()); in test_ConstructorLjava_io_FileDescriptor()
66 fis.close(); in test_ConstructorLjava_io_FileDescriptor()
110 if (fis != null) { in tearDown()
111 fis.close(); in tearDown()
DFileOutputStreamTest.java41 private FileInputStream fis; field in FileOutputStreamTest
64 if (fis != null) { in tearDown()
65 fis.close(); in tearDown()
89 fis = new FileInputStream(fileName); in test_ConstructorLjava_io_FileDescriptor()
90 fos = new FileOutputStream(fis.getFD()); in test_ConstructorLjava_io_FileDescriptor()
92 fis.close(); in test_ConstructorLjava_io_FileDescriptor()
122 fis = new FileInputStream(f.getPath()); in test_ConstructorLjava_lang_StringZ()
123 fis.read(buf, 0, buf.length); in test_ConstructorLjava_lang_StringZ()
189 fis = new FileInputStream(f.getPath()); in test_write$B()
191 fis.read(rbytes, 0, fileString.length()); in test_write$B()
[all …]
DFileWriterTest.java32 private FileInputStream fis; field in FileWriterTest
101 fis = new FileInputStream(f.getPath()); in test_ConstructorLjava_io_FileDescriptor()
102 br = new BufferedReader(new FileReader(fis.getFD())); in test_ConstructorLjava_io_FileDescriptor()
106 fis.close(); in test_ConstructorLjava_io_FileDescriptor()
180 fis.close(); in tearDown()
DInputStreamReaderTest.java91 private InputStream fis; field in InputStreamReaderTest
117 fis = new ByteArrayInputStream(bos.toByteArray()); in setUp()
118 is = new InputStreamReader(fis); in setUp()
129 fis.close(); in tearDown()
207 is = new InputStreamReader(fis, "8859_1"); in test_ConstructorLjava_io_InputStreamLjava_lang_String()
210 is = new InputStreamReader(fis, "Bogus"); in test_ConstructorLjava_io_InputStreamLjava_lang_String()
303 InputStreamReader isr = new InputStreamReader(fis, "8859_1"); in test_getEncoding()
306 isr = new InputStreamReader(fis, "ISO-8859-1"); in test_getEncoding()
/libcore/ojluni/src/test/java/io/FileInputStream/
DReadXBytes.java57 try (FileInputStream fis = new FileInputStream(empty)) { in main() argument
59 fis.readNBytes(-1); in main()
63 byte[] nbytes = fis.readNBytes(0); in main()
67 byte[] b = fis.readNBytes(1); in main()
71 b = fis.readAllBytes(); in main()
90 try (FileInputStream fis = new FileInputStream(file)) { in main() argument
93 fis.getChannel().position(pos); in main()
94 byte[] nbytes = fis.readNBytes(0); in main()
97 nbytes = fis.readNBytes(len); in main()
104 try (FileInputStream fis = new FileInputStream(file)) { in main() argument
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DFileInputStreamTest.java89 FileInputStream fis = new FileInputStream(pipe[0]); in testSkipInPipes() local
90 fis.skip(SKIP_SIZE); in testSkipInPipes()
91 verifyData(fis, SKIP_SIZE, TOTAL_SIZE - SKIP_SIZE); in testSkipInPipes()
92 assertEquals(-1, fis.read()); in testSkipInPipes()
179 FileInputStream fis = new FileInputStream(tmp); in testClose() local
182 fis.close(); in testClose()
183 fis.close(); in testClose()
187 fis.available(); in testClose()
192 fis.read(); in testClose()
197 fis.read(new byte[1], 0, 1); in testClose()
[all …]
DOldFileWriterTest.java34 FileInputStream fis; field in OldFileWriterTest
100 FileInputStream fis = new FileInputStream(f); in test_handleEarlyEOFChar_1() local
101 in = new InputStreamReader(fis); in test_handleEarlyEOFChar_1()
161 FileInputStream fis = new FileInputStream(f); in test_handleExternalFileDescriptor() local
162 in = new InputStreamReader(fis); in test_handleExternalFileDescriptor()
190 fis.close(); in tearDown()
DOldInputStreamReaderTest.java41 private InputStream fis; field in OldInputStreamReaderTest
57 fis = new ByteArrayInputStream(bos.toByteArray()); in setUp()
58 is = new InputStreamReader(fis); in setUp()
65 fis.close(); in tearDown()
170 is = new InputStreamReader(fis, "8859_1"); in test_ConstructorLjava_io_InputStreamLjava_lang_String()
176 is = new InputStreamReader(fis, "Bogus"); in test_ConstructorLjava_io_InputStreamLjava_lang_String()
DFileDescriptorTest.java40 FileInputStream fis = new FileInputStream(f); in test_isSocket() local
41 assertFalse(fis.getFD().isSocket$()); in test_isSocket()
42 fis.close(); in test_isSocket()
/libcore/luni/src/test/java/libcore/libcore/io/
DFdsanTest.java34 try (FileInputStream fis = new FileInputStream("/dev/null")) { in testFileInputStream() argument
35 FileDescriptor fd = fis.getFD(); in testFileInputStream()
39 assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag)); in testFileInputStream()
44 try (FileOutputStream fis = new FileOutputStream("/dev/null")) { in testFileOutputStream() argument
45 FileDescriptor fd = fis.getFD(); in testFileOutputStream()
49 assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag)); in testFileOutputStream()
54 try (RandomAccessFile fis = new RandomAccessFile("/dev/null", "r")) { in testRandomAccessFile() argument
55 FileDescriptor fd = fis.getFD(); in testRandomAccessFile()
59 assertEquals(System.identityHashCode(fis), Libcore.os.android_fdsan_get_tag_value(tag)); in testRandomAccessFile()
72 try (FileInputStream fis = new FileInputStream("/dev/null")) { in testParcelFileDescriptor() argument
[all …]
/libcore/luni/src/test/java/libcore/java/util/zip/
DOldZipInputStreamTest.java63 FileInputStream fis = new FileInputStream(new File(resources, in test_skipJ() local
66 ZipInputStream zis1 = new ZipInputStream(fis); in test_skipJ()
92 FileInputStream fis = new FileInputStream(new File(resources, in test_read$BII() local
95 ZipInputStream zis1 = new ZipInputStream(fis); in test_read$BII()
131 FileInputStream fis = new FileInputStream(new File(resources, in test_closeEntry() local
134 ZipInputStream zis1 = new ZipInputStream(fis); in test_closeEntry()
169 FileInputStream fis = new FileInputStream(fl); in test_createZipEntryLjava_lang_String() local
171 Mock_ZipInputStream zis1 = new Mock_ZipInputStream(fis); in test_createZipEntryLjava_lang_String()
/libcore/ojluni/src/test/java/nio/channels/Channels/
DBasic.java216 FileInputStream fis = new FileInputStream(blah); in readAndCheck() local
223 bytesRead = fis.read(bb, totalRead, messageSize - totalRead); in readAndCheck()
232 fis.close(); in readAndCheck()
254 FileInputStream fis = new FileInputStream(blah); in testNewInputStream() local
255 FileChannel fc = fis.getChannel(); in testNewInputStream()
280 fis.close(); in testNewInputStream()
294 ExtendedFileInputStream fis = new ExtendedFileInputStream(blah); in testNewChannelIn() local
295 ReadableByteChannel rbc = Channels.newChannel(fis); in testNewChannelIn()
316 fis.close(); in testNewChannelIn()
337 try (ExtendedFileInputStream fis = new ExtendedFileInputStream(blah)) { in testNewChannelReadAfterClose() argument
[all …]
/libcore/ojluni/src/test/java/util/Properties/
DEscapeSpace.java61 FileInputStream fis = null; in load() local
65 fis = new FileInputStream(file); in load()
66 bis = new BufferedInputStream( fis ); in load()
73 if (fis != null) in load()
74 fis.close(); in load()
/libcore/luni/src/test/java/libcore/java/nio/channels/
DFileIOInterruptTest.java101 FileInputStream fis = new FileInputStream(fifoFile); in testStreamRead_exceptionWhenAlreadyClosed() local
102 fis.close(); in testStreamRead_exceptionWhenAlreadyClosed()
106 fis.read(buffer); in testStreamRead_exceptionWhenAlreadyClosed()
120 FileInputStream fis = new FileInputStream(fifoFile); in testStreamRead_exceptionOnCloseWhenBlocked() local
121 StreamReader streamReader = new StreamReader(fis); in testStreamRead_exceptionOnCloseWhenBlocked()
128 fis.close(); in testStreamRead_exceptionOnCloseWhenBlocked()
193 FileInputStream fis = new FileInputStream(fifoFile); in testChannelRead_exceptionWhenAlreadyClosed() local
194 FileChannel fileInputChannel = fis.getChannel(); in testChannelRead_exceptionWhenAlreadyClosed()
225 FileInputStream fis = new FileInputStream(fifoFile); in testChannelRead_exceptionWhenAlreadyInterrupted() local
226 FileChannel fileInputChannel = fis.getChannel(); in testChannelRead_exceptionWhenAlreadyInterrupted()
[all …]
DOldFileChannelTest.java74 private FileInputStream fis; field in OldFileChannelTest
88 fis = null; in setUp()
120 if (null != fis) { in tearDown()
122 fis.close(); in tearDown()
153 fis = new FileInputStream(fileOfWriteOnlyFileChannel); in test_forceZ()
154 fis.read(readBuffer); in test_forceZ()
159 fis.close(); in test_forceZ()
162 fis = new FileInputStream(fileOfWriteOnlyFileChannel); in test_forceZ()
163 fis.read(readBuffer); in test_forceZ()
165 fis.close(); in test_forceZ()
[all …]
DFileLockTest.java58 try(FileInputStream fis = new FileInputStream(tmp)) { in testToString() argument
59 try(FileChannel fc = fis.getChannel()) { in testToString()
/libcore/luni/src/test/java/tests/security/cert/
DCertificateFactory3Test.java152 InputStream fis = Support_Resources in testGenerateCertPath02() local
154 certPath = certFs[i].generateCertPath(fis, "PkiPath"); in testGenerateCertPath02()
155 fis.close(); in testGenerateCertPath02()
180 InputStream fis = Support_Resources in testGenerateCertPath03() local
182 certPath = certFs[i].generateCertPath(fis); in testGenerateCertPath03()
183 fis.close(); in testGenerateCertPath03()
/libcore/ojluni/src/test/java/util/Scanner/
DEncodingTest.java111 FileInputStream fis = new FileInputStream(file); in getScanner() local
112 return new Scanner(fis, csn); in getScanner()
124 FileInputStream fis = new FileInputStream(file); in getScanner() local
125 return new Scanner(fis, charset); in getScanner()
/libcore/luni/src/test/java/libcore/dalvik/system/
DBlockGuardTest.java123 FileInputStream fis = new FileInputStream(tmpFile); in testFileInputStream() local
126 fis.read(new byte[4], 0, 4); in testFileInputStream()
129 fis.read(); in testFileInputStream()
132 fis.skip(1); in testFileInputStream()
135 fis.close(); in testFileInputStream()
205 try (FileInputStream fis = new FileInputStream(new File("/dev/null"))) { in testUnbufferedIO() argument
210 fis.read(b); in testUnbufferedIO()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DZipInputStreamTest.java125 FileInputStream fis = new FileInputStream(new File(resources, in test_closeAfterException() local
128 ZipInputStream zis1 = new ZipInputStream(fis); in test_closeAfterException()
222 FileInputStream fis = new FileInputStream(fl); in test_available() local
224 ZipInputStream zis1 = new ZipInputStream(fis); in test_available()
/libcore/ojluni/src/main/java/java/util/jar/
DManifest.java287 FastInputStream fis = new FastInputStream(is); in read() local
291 int lineNumber = attr.read(fis, lbuf, jarFilename, 0); in read()
302 while ((len = fis.readLine(lbuf)) != -1) { in read()
324 if (fis.peek() == ' ') { in read()
335 if (fis.peek() == ' ') { in read()
348 lineNumber = attr.read(fis, lbuf, jarFilename, lineNumber); in read()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DMappedByteBufferTest.java45 FileInputStream fis = new FileInputStream(tmpFile); in testasIntBuffer() local
46 FileChannel fc = fis.getChannel(); in testasIntBuffer()
75 FileInputStream fis = new FileInputStream(emptyFile); in testEmptyBuffer() local
76 FileChannel fc = fis.getChannel(); in testEmptyBuffer()
/libcore/ojluni/src/main/java/sun/security/util/
DAnchorCertificates.java62 try (FileInputStream fis = new FileInputStream(f)) {
63 cacerts.load(fis, null);

12