Home
last modified time | relevance | path

Searched refs:FileChannel (Results 1 – 25 of 42) 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;
86 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseRaf_sameChannelReturned()
88 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseRaf_sameChannelReturned()
96 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseRaf_channelIsClosed()
98 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseRaf_channelIsClosed()
106 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseFileChannel_sameChannelReturned()
109 FileChannel fileChannelAfterClosing = raf.getChannel(); in testCloseFileChannel_sameChannelReturned()
117 FileChannel fileChannelBeforeClosing = raf.getChannel(); in testCloseFileChannel_returnedFileChannelIsClosed()
121 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 …]
/libcore/ojluni/src/main/java/java/nio/channels/
DFileLock.java147 protected FileLock(FileChannel channel, in FileLock()
209 public final FileChannel channel() { in channel()
210 return (channel instanceof FileChannel) ? (FileChannel)channel : null; in channel()
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/luni/src/main/java/java/nio/
DNioUtils.java23 import java.nio.channels.FileChannel;
59 public static FileDescriptor getFD(FileChannel fc) { in getFD()
66 public static FileChannel newFileChannel(Closeable ioObject, FileDescriptor fd, int mode) { in newFileChannel()
/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()
/libcore/ojluni/annotations/mmodule/java/io/
DFileInputStream.annotated.java30 import java.nio.channels.FileChannel;
58 public java.nio.channels.FileChannel getChannel() { throw new RuntimeException("Stub!"); } in getChannel()
/libcore/ojluni/annotations/hiddenapi/sun/nio/ch/
DFileChannelImpl.java31 public class FileChannelImpl extends java.nio.channels.FileChannel {
43 public static java.nio.channels.FileChannel open( in open()
52 public static java.nio.channels.FileChannel open( in open()
96 public java.nio.channels.FileChannel position(long newPosition) throws java.io.IOException { in position()
104 public java.nio.channels.FileChannel truncate(long newSize) throws java.io.IOException { in truncate()
181 java.nio.channels.FileChannel.MapMode mode, long position, long size) in map()
/libcore/ojluni/src/main/java/java/io/
DFileInputStream.java31 import java.nio.channels.FileChannel;
72 private FileChannel channel = null;
462 public FileChannel getChannel() { in getChannel()
DFileOutputStream.java34 import java.nio.channels.FileChannel;
82 private FileChannel channel;
466 public FileChannel getChannel() { in getChannel()
/libcore/ojluni/src/main/java/java/net/
DSocketOutputStream.java32 import java.nio.channels.FileChannel;
79 public final FileChannel getChannel() { in getChannel()
DSocketInputStream.java32 import java.nio.channels.FileChannel;
81 public final FileChannel getChannel() { 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()
657 String readFromFileChannel(FileChannel fc) throws IOException { in readFromFileChannel()
663 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/sun/nio/ch/
DFileLockImpl.java36 FileLockImpl(FileChannel channel, long position, long size, boolean shared) in FileLockImpl()
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixChannelFactory.java103 static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) { in newFileChannel()
112 static FileChannel newFileChannel(int dfd, in newFileChannel()
143 static FileChannel newFileChannel(UnixPath path, in newFileChannel()
/libcore/luni/src/main/java/libcore/io/
DMemoryMappedFile.java25 import java.nio.channels.FileChannel;

12