Home | History | Annotate | Download | only in io

Lines Matching refs:fos

33     private FileOutputStream fos;
60 if (fos != null) {
61 fos.close();
70 fos = new FileOutputStream(f);
79 fos = new FileOutputStream(fileName);
80 fos.write('l');
81 fos.close();
83 fos = new FileOutputStream(fis.getFD());
84 fos.close();
94 fos = new FileOutputStream(fileName);
97 fos = new FileOutputStream("/dev/null");
98 fos.close();
107 fos = new FileOutputStream(f.getPath(), false);
108 fos.write("HI".getBytes(), 0, 2);
109 fos.close();
110 fos = new FileOutputStream(f.getPath(), true);
111 fos.write(fileString.getBytes());
112 fos.close();
125 fos = new FileOutputStream("");
130 if (fos != null) {
131 fos.close();
135 fos = new FileOutputStream(new File(""));
140 if (fos != null) {
141 fos.close();
151 fos = new FileOutputStream(f.getPath());
152 fos.close();
155 fos.write(fileString.getBytes());
168 fos = new FileOutputStream(f);
169 assertTrue("Returned invalid fd", fos.getFD().valid());
170 fos.close();
171 assertTrue("Returned invalid fd", !fos.getFD().valid());
179 fos = new FileOutputStream(f.getPath());
180 fos.write(fileString.getBytes());
193 fos = new FileOutputStream(f.getPath());
194 fos.write(fileString.getBytes(), 0, fileString.length());
220 fos = new FileOutputStream(f.getPath());
221 fos.write('t');
232 fos = new FileOutputStream(f.getPath());
235 fos.write(null, 1, 1);
241 fos.write(new byte[1], -1, 1);
247 fos.write(new byte[1], 0, -1);
253 fos.write(new byte[1], 0, 5);
259 fos.write(new byte[10], Integer.MAX_VALUE, 5);
265 fos.write(new byte[10], 5, Integer.MAX_VALUE);
269 fos.close();
288 FileOutputStream fos = new FileOutputStream(tmpfile);
289 fos.write(bytes);
290 fos.flush();
291 fos.close();
299 FileOutputStream fos = new FileOutputStream(tmpfile, true);
300 assertEquals(0, fos.getChannel().position());
301 fos.write(bytes);
302 assertEquals(10, fos.getChannel().position());
303 fos.write(bytes);
304 assertEquals(20, fos.getChannel().position());
305 fos.write(bytes);
306 assertEquals(30, fos.getChannel().position());
307 fos.close();
310 fos.getChannel().position();
320 FileOutputStream fos = new FileOutputStream(tmpfile, false);
321 assertEquals(0, fos.getChannel().position());
322 fos.write(bytes);
323 assertEquals(10, fos.getChannel().position());
324 fos.write(bytes);
325 assertEquals(20, fos.getChannel().position());
326 fos.write(bytes);
327 assertEquals(30, fos.getChannel().position());
328 fos.close();
331 fos.getChannel().position();
341 FileOutputStream fos = new FileOutputStream(tmpfile, false);
342 assertEquals(0, fos.getChannel().position());
343 fos.write(bytes);
344 assertEquals(10, fos.getChannel().position());
345 fos.close();
347 fos = new FileOutputStream(tmpfile, false);
348 assertEquals(0, fos.getChannel().position());
349 fos.close();
355 FileOutputStream fos = new FileOutputStream(tmpfile, false);
356 assertEquals(0, fos.getChannel().position());
357 fos.write(bytes);
358 assertEquals(10, fos.getChannel().position());
359 fos.close();
361 fos = new FileOutputStream(tmpfile, true);
362 assertEquals(10, fos.getChannel().position());
363 fos.close();
369 FileOutputStream fos = new FileOutputStream(tmpfile, true);
370 assertEquals(0, fos.getChannel().position());
371 fos.write(bytes);
372 assertEquals(10, fos.getChannel().position());
373 fos.close();
375 fos = new FileOutputStream(tmpfile, false);
376 assertEquals(0, fos.getChannel().position());
377 fos.close();
383 FileOutputStream fos = new FileOutputStream(tmpfile, true);
384 assertEquals(0, fos.getChannel().position());
385 fos.write(bytes);
386 assertEquals(10, fos.getChannel().position());
387 fos.close();
389 fos = new FileOutputStream(tmpfile, true);
390 FileChannel fc = fos.getChannel();
394 fos.close();