Home
last modified time | relevance | path

Searched refs:FileChannel (Results 1 – 25 of 38) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DMapModeTest.java19 import java.nio.channels.FileChannel;
32 assertNotNull(FileChannel.MapMode.PRIVATE); in test_PRIVATE_READONLY_READWRITE()
33 assertNotNull(FileChannel.MapMode.READ_ONLY); in test_PRIVATE_READONLY_READWRITE()
34 assertNotNull(FileChannel.MapMode.READ_WRITE); in test_PRIVATE_READONLY_READWRITE()
36 assertFalse(FileChannel.MapMode.PRIVATE in test_PRIVATE_READONLY_READWRITE()
37 .equals(FileChannel.MapMode.READ_ONLY)); in test_PRIVATE_READONLY_READWRITE()
38 assertFalse(FileChannel.MapMode.PRIVATE in test_PRIVATE_READONLY_READWRITE()
39 .equals(FileChannel.MapMode.READ_WRITE)); in test_PRIVATE_READONLY_READWRITE()
40 assertFalse(FileChannel.MapMode.READ_ONLY in test_PRIVATE_READONLY_READWRITE()
41 .equals(FileChannel.MapMode.READ_WRITE)); in test_PRIVATE_READONLY_READWRITE()
[all …]
DFileChannelLockingTest.java25 import java.nio.channels.FileChannel;
38 private FileChannel readOnlyChannel;
40 private FileChannel writeOnlyChannel;
42 private FileChannel readWriteChannel;
DFileLockTest.java24 import java.nio.channels.FileChannel;
34 private FileChannel readWriteChannel;
42 protected MockFileLock(FileChannel channel, long position, long size, in MockFileLock()
176 FileChannel fileChannel = fout.getChannel(); in test_release()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DMappedByteBufferTest.java29 import java.nio.channels.FileChannel;
31 import java.nio.channels.FileChannel.MapMode;
46 FileChannel fc = fis.getChannel(); in testasIntBuffer()
47 MappedByteBuffer mmb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc in testasIntBuffer()
76 FileChannel fc = fis.getChannel(); in testEmptyBuffer()
77 MappedByteBuffer mmb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size()); in testEmptyBuffer()
104 mmb = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in testEmptyBuffer()
113 mmb = fc.map(FileChannel.MapMode.PRIVATE, 0, fc.size()); in testEmptyBuffer()
129 FileChannel fileChannelRead = fileInputStream.getChannel(); in test_force()
136 FileChannel fileChannelR = inputStream.getChannel(); in test_force()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DRandomAccessFileTest.java23 import java.nio.channels.FileChannel;
76 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseRaf_sameChannelReturned()
78 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseRaf_sameChannelReturned()
86 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseRaf_channelIsClosed()
88 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseRaf_channelIsClosed()
96 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseFileChannel_sameChannelReturned()
99 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseFileChannel_sameChannelReturned()
107 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseFileChannel_returnedFileChannelIsClosed()
111 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseFileChannel_returnedFileChannelIsClosed()
/libcore/luni/src/test/java/libcore/java/nio/channels/
DFileChannelTest.java31 import java.nio.channels.FileChannel;
55 FileChannel fc = new FileInputStream(tmp).getChannel(); in testReadOnlyByteArrays()
90 FileChannel fc = new FileOutputStream(tmp).getChannel(); in test_readv()
110 FileChannel fc = new FileOutputStream(tmp).getChannel(); in test_writev()
124 FileChannel fc = fos.getChannel(); in test_append()
140 FileChannel fc = createFileContainingBytes(initialBytes); in test_position_writeAddsPadding()
160 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_greaterThanSizeWithPositionChange()
182 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_greaterThanSizeWithoutPositionChange()
202 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_lessThanSizeWithPositionChange()
222 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_lessThanSizeWithoutPositionChange()
[all …]
DFileIOInterruptTest.java30 import java.nio.channels.FileChannel;
194 FileChannel fileInputChannel = fis.getChannel(); in testChannelRead_exceptionWhenAlreadyClosed()
226 FileChannel fileInputChannel = fis.getChannel(); in testChannelRead_exceptionWhenAlreadyInterrupted()
263 FileChannel fileInputChannel = fis.getChannel(); in testChannelRead_exceptionOnCloseWhenBlocked()
294 FileChannel fileChannel = new FileInputStream(fifoFile).getChannel(); in testChannelRead_exceptionOnInterrupt()
326 FileChannel fileOutputChannel = new FileOutputStream(fifoFile).getChannel(); in testChannelWrite_exceptionWhenAlreadyClosed()
358 FileChannel fileInputChannel = fos.getChannel(); in testChannelWrite_exceptionWhenAlreadyInterrupted()
394 FileChannel fileOutputChannel = new FileOutputStream(fifoFile).getChannel(); in testChannelWrite_exceptionOnCloseWhenBlocked()
436 FileChannel fileChannel = new FileOutputStream(fifoFile).getChannel(); in testChannelWrite_exceptionOnInterrupt()
538 private final FileChannel channel;
[all …]
DOldFileChannelTest.java30 import java.nio.channels.FileChannel;
61 private FileChannel readOnlyFileChannel;
63 private FileChannel writeOnlyFileChannel;
65 private FileChannel readWriteFileChannel;
503 private void doTestForIOOBException(FileChannel channel, in doTestForIOOBException()
645 FileChannel channel = out.getChannel(); in test_isOpen()
/libcore/ojluni/src/main/java/java/nio/channels/
DFileChannel.java155 public abstract class FileChannel class
162 protected FileChannel() { } in FileChannel() method in FileChannel
281 public static FileChannel open(Path path, in open()
330 public static FileChannel open(Path path, OpenOption... options) in open()
461 public abstract FileChannel position(long newPosition) throws IOException; in position()
504 public abstract FileChannel truncate(long size) throws IOException; in truncate()
/libcore/benchmarks/src/benchmarks/regression/
DByteBufferBulkBenchmark.java31 import java.nio.channels.FileChannel;
61 FileChannel fc = raf.getChannel(); in newBuffer()
62 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
DByteBufferBenchmark.java31 import java.nio.channels.FileChannel;
71 FileChannel fc = raf.getChannel(); in newBuffer()
72 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
/libcore/luni/src/main/java/java/nio/
DNioUtils.java26 import java.nio.channels.FileChannel;
73 public static FileDescriptor getFD(FileChannel fc) { in getFD()
82 public static FileChannel newFileChannel(Closeable ioObject, FileDescriptor fd, int mode) { in newFileChannel()
/libcore/ojluni/src/main/java/java/io/
DFileInputStream.java31 import java.nio.channels.FileChannel;
72 private FileChannel channel = null;
472 public FileChannel getChannel() { in getChannel()
DFileOutputStream.java34 import java.nio.channels.FileChannel;
82 private FileChannel channel;
475 public FileChannel getChannel() { in getChannel()
DRandomAccessFile.java30 import java.nio.channels.FileChannel;
87 private FileChannel channel = null;
347 public final FileChannel getChannel() { in getChannel()
/libcore/ojluni/annotations/mmodule/java/io/
DFileInputStream.annotated.java30 import java.nio.channels.FileChannel;
59 public java.nio.channels.FileChannel getChannel() { throw new RuntimeException("Stub!"); } in getChannel()
/libcore/ojluni/annotations/hiddenapi/java/io/
DFileOutputStream.java87 public java.nio.channels.FileChannel getChannel() { in getChannel()
102 private java.nio.channels.FileChannel channel;
DFileInputStream.java89 public java.nio.channels.FileChannel getChannel() { in getChannel()
97 private java.nio.channels.FileChannel channel;
DRandomAccessFile.java52 public final java.nio.channels.FileChannel getChannel() { in getChannel()
222 private java.nio.channels.FileChannel channel;
/libcore/luni/src/test/java/libcore/java/nio/file/
DDefaultFileSystemProvider2Test.java27 import java.nio.channels.FileChannel;
433 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel()
443 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel()
453 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel()
465 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel()
479 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel()
492 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions); in test_newFileChannel()
579 FileChannel fc = provider.newFileChannel(filesSetup.getDataFilePath(), openOptions, in test_newFileChannel_withFileAttributes()
658 String readFromFileChannel(FileChannel fc) throws IOException { in readFromFileChannel()
664 void writeToFileChannel(FileChannel fc, String data) throws IOException { in writeToFileChannel()
/libcore/ojluni/src/main/java/java/util/logging/
DFileHandler.java38 import java.nio.channels.FileChannel;
158 private FileChannel lockFileChannel;
455 FileChannel channel = null; in openFiles()
460 channel = FileChannel.open(lockFilePath, in openFiles()
472 channel = FileChannel.open(lockFilePath, in openFiles()
/libcore/ojluni/src/main/java/java/net/
DSocketInputStream.java32 import java.nio.channels.FileChannel;
81 public final FileChannel getChannel() { in getChannel()
/libcore/ojluni/src/main/java/sun/nio/ch/
DFileLockImpl.java36 FileLockImpl(FileChannel channel, long position, long size, boolean shared) in FileLockImpl()
DFileChannelImpl.java38 import java.nio.channels.FileChannel;
59 extends FileChannel
116 public static FileChannel open(FileDescriptor fd, String path, in open()
124 public static FileChannel open(FileDescriptor fd, String path, in open()
320 public FileChannel position(long newPosition) throws IOException { in position()
370 public FileChannel truncate(long newSize) throws IOException { in truncate()
/libcore/ojluni/src/main/java/sun/nio/cs/
DStreamDecoder.java214 private static FileChannel getChannel(FileInputStream in) { in getChannel()
409 || (ch instanceof FileChannel)); // ## RBC.available()? in inReady()

12