Home
last modified time | relevance | path

Searched refs:FileChannel (Results 1 – 25 of 28) 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()
DFileChannelTest.java34 import java.nio.channels.FileChannel;
44 import java.nio.channels.FileChannel.MapMode;
77 private FileChannel readOnlyFileChannel;
79 private FileChannel writeOnlyFileChannel;
81 private FileChannel readWriteFileChannel;
514 FileChannel specialFile = in test_size()
1320 FileChannel mockChannel = new MockFileChannel(); in test_read$LByteBuffer_mock()
1599 FileChannel channel = out.getChannel(); in test_isOpen()
3016 private class MockFileChannel extends FileChannel {
3049 public FileChannel position(long arg0) throws IOException { in position()
[all …]
/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.java25 import java.nio.channels.FileChannel;
34 FileChannel fc = new FileInputStream(tmp).getChannel(); in testReadOnlyByteArrays()
69 FileChannel fc = new FileOutputStream(tmp).getChannel(); in test_readv()
89 FileChannel fc = new FileOutputStream(tmp).getChannel(); in test_writev()
103 FileChannel fc = fos.getChannel(); in test_append()
119 FileChannel fc = createFileContainingBytes(initialBytes); in test_position_writeAddsPadding()
139 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_greaterThanSizeWithPositionChange()
161 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_greaterThanSizeWithoutPositionChange()
181 FileChannel fc = createFileContainingBytes(initialBytes); in test_truncate_lessThanSizeWithPositionChange()
201 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()
428 FileChannel fileChannel = new FileOutputStream(fifoFile).getChannel(); in testChannelWrite_exceptionOnInterrupt()
530 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/luni/src/main/java/java/nio/channels/
DFileChannel.java79 public abstract class FileChannel extends AbstractInterruptibleChannel class
125 protected FileChannel() { in FileChannel() method in FileChannel
280 public abstract MappedByteBuffer map(FileChannel.MapMode mode, in map()
312 public abstract FileChannel position(long newPosition) throws IOException; in position()
560 public abstract FileChannel truncate(long size) throws IOException; in truncate()
DFileLock.java74 private final FileChannel channel;
99 protected FileLock(FileChannel channel, long position, long size, boolean shared) { in FileLock()
112 public final FileChannel channel() { in channel()
DChannels.java226 if (channel instanceof FileChannel) { in available()
227 FileChannel fileChannel = (FileChannel) channel; in available()
/libcore/luni/src/main/java/java/nio/
DNioUtils.java23 import java.nio.channels.FileChannel;
43 public static FileDescriptor getFD(FileChannel fc) { in getFD()
50 public static FileChannel newFileChannel(Closeable ioObject, FileDescriptor fd, int mode) { in newFileChannel()
DFileChannelImpl.java28 import java.nio.channels.FileChannel;
46 final class FileChannelImpl extends FileChannel {
140 public FileLockImpl(FileChannel channel, long position, long size, boolean shared) { in FileLockImpl()
270 public FileChannel position(long newPosition) throws IOException { in position()
382 if (src instanceof FileChannel) { in transferFrom()
383 FileChannel fileSrc = (FileChannel) src; in transferFrom()
453 public FileChannel truncate(long size) throws IOException { in truncate()
DMappedByteBuffer.java20 import java.nio.channels.FileChannel.MapMode;
DMemoryBlock.java24 import java.nio.channels.FileChannel.MapMode;
/libcore/luni/src/main/java/java/io/
DFileOutputStream.java22 import java.nio.channels.FileChannel;
58 private FileChannel channel;
168 public FileChannel getChannel() { in getChannel()
DFileInputStream.java23 import java.nio.channels.FileChannel;
60 private FileChannel channel;
156 public FileChannel getChannel() { in getChannel()
DRandomAccessFile.java23 import java.nio.channels.FileChannel;
51 private FileChannel channel;
190 public final synchronized FileChannel getChannel() { in getChannel()
/libcore/expectations/
Dtaggedtests.txt27 "java.nio.channels.FileChannel.ExpandingMap",
28 "java.nio.channels.FileChannel.Transfers",
/libcore/luni/src/main/java/libcore/io/
DMemoryMappedFile.java24 import java.nio.channels.FileChannel;
/libcore/luni/src/main/java/java/util/logging/
DFileHandler.java26 import java.nio.channels.FileChannel;
191 FileChannel channel = fileStream.getChannel(); in initOutputFiles()
494 FileChannel channel = lock.channel(); in close()
/libcore/luni/src/main/java/libcore/util/
DZoneInfoDB.java24 import java.nio.channels.FileChannel.MapMode;
/libcore/benchmarks/src/benchmarks/regression/
DByteBufferBenchmark.java67 FileChannel fc = raf.getChannel(); in newBuffer()
68 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
/libcore/luni/src/test/java/libcore/java/nio/
DBufferTest.java38 import java.nio.channels.FileChannel;
48 FileChannel ch = raf.getChannel(); in allocateMapped()
49 MappedByteBuffer result = ch.map(FileChannel.MapMode.READ_WRITE, 0, size); in allocateMapped()
61 MappedByteBuffer mbb = raf.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, 65536); in testDevZeroMap()
87 .map(FileChannel.MapMode.READ_WRITE, 65536, 131072); in testDevZeroMapRW()
/libcore/luni/src/test/java/libcore/java/io/
DOldRandomAccessFileTest.java28 import java.nio.channels.FileChannel;
150 FileChannel fcr = raf.getChannel(); in test_ConstructorLjava_lang_StringLjava_lang_String()
184 FileChannel fc = raf.getChannel(); in test_getChannel()

12