Home
last modified time | relevance | path

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

123

/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.java27 import java.nio.channels.FileChannel;
37 private FileChannel readWriteChannel;
45 protected MockFileLock(FileChannel channel, long position, long size, in MockFileLock()
195 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/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 …]
DFileLockTest.java25 import java.nio.channels.FileChannel;
40 try(FileChannel fc = fos.getChannel()) { in testToString()
59 try(FileChannel fc = fis.getChannel()) { in testToString()
/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/ojluni/src/main/java/java/nio/channels/
DFileChannel.java155 public abstract class FileChannel class
162 protected FileChannel() { } in FileChannel() method in FileChannel
286 public static FileChannel open(Path path, in open()
335 public static FileChannel open(Path path, OpenOption... options) in open()
471 public abstract FileChannel position(long newPosition) throws IOException; in position()
514 public abstract FileChannel truncate(long size) throws IOException; in truncate()
DFileLock.java151 protected FileLock(FileChannel channel, in FileLock()
223 public final FileChannel channel() { in channel()
224 return (channel instanceof FileChannel) ? (FileChannel)channel : null; in channel()
/libcore/ojluni/src/main/java/java/io/
DFileInputStream.java31 import java.nio.channels.FileChannel;
89 private volatile FileChannel channel;
562 FileChannel fc = channel; in close()
615 public FileChannel getChannel() { in getChannel()
616 FileChannel fc = this.channel; in getChannel()
DFileOutputStream.java33 import java.nio.channels.FileChannel;
99 private volatile FileChannel channel;
522 public FileChannel getChannel() { in getChannel()
523 FileChannel fc = this.channel; in getChannel()
/libcore/ojluni/src/test/java/nio/MappedByteBuffer/
DForceViews.java36 import java.nio.channels.FileChannel;
37 import static java.nio.channels.FileChannel.MapMode.*;
52 private FileChannel fc;
60 fc = FileChannel.open(file, CREATE_NEW, READ, WRITE, DELETE_ON_CLOSE); in openChannel()
99 private void test(String tst, FileChannel fc, int mapPosition, int mapLength, in test()
/libcore/luni/src/main/java/java/nio/
DNioUtils.java26 import java.nio.channels.FileChannel;
71 public static FileDescriptor getFD(FileChannel fc) { in getFD()
81 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/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/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/src/main/java/java/net/
DSocketOutputStream.java32 import java.nio.channels.FileChannel;
78 public final FileChannel getChannel() { in getChannel()
DSocketInputStream.java32 import java.nio.channels.FileChannel;
80 public final FileChannel getChannel() { in getChannel()
/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/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;
/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/fs/
DUnixChannelFactory.java103 static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) { in newFileChannel()
112 static FileChannel newFileChannel(int dfd, in newFileChannel()
146 static FileChannel newFileChannel(UnixPath path, in newFileChannel()
/libcore/ojluni/src/test/java/nio/channels/Channels/
DWrite.java44 FileChannel fc = fos.getChannel(); in testWrite()

123