Lines Matching defs:file
12 * version 2 for more details (a copy is included in the LICENSE file that
29 import java.nio.file.*;
37 import static java.nio.file.StandardOpenOption.*;
44 // create temporary file
62 // these tests open the file themselves
75 * Writes buffer to file using a CompletionHandler to consume the result
77 * Reads file to EOF to a new buffer using a CompletionHandler to consume
88 // generate buffer with random elements and write it to file
108 * Writes buffer to file, invoking the Future's get method to wait for
110 * Reads file to EOF to a new buffer, invoking the Future's get method to
124 // write buffer completely to file
139 // read file into new buffer
168 static void testLocking(Path file) throws IOException {
172 .open(file, READ, WRITE);
283 static void testCustomThreadPool(Path file) throws IOException {
308 AsynchronousFileChannel ch = AsynchronousFileChannel.open(file, opts, executor);
353 channels[i] = AsynchronousFileChannel.open(file, opts, executor);
378 static void testAsynchronousClose(Path file) throws IOException {
381 // create file
383 .open(file, WRITE, TRUNCATE_EXISTING);
394 ch = AsynchronousFileChannel.open(file, WRITE, SYNC);
412 // close file
432 static void testCancel(Path file) throws IOException {
441 .open(file, WRITE, SYNC);
486 static void testTruncate(Path file) throws IOException {
491 .open(file, CREATE, WRITE, TRUNCATE_EXISTING);
500 // truncate file
521 ch = AsynchronousFileChannel.open(file, READ);