Home
last modified time | relevance | path

Searched refs:MapMode (Results 1 – 10 of 10) sorted by relevance

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DMapModeTest.java32 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()
48 assertNotNull(FileChannel.MapMode.PRIVATE.toString()); in test_toString()
[all …]
DFileChannelTest.java44 import java.nio.channels.FileChannel.MapMode;
1729 writeOnlyFileChannel.map(MapMode.READ_ONLY, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1735 writeOnlyFileChannel.map(MapMode.READ_WRITE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1741 writeOnlyFileChannel.map(MapMode.PRIVATE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1748 writeOnlyFileChannel.map(MapMode.READ_WRITE, 0, -1); in test_map_AbnormalMode()
1755 readOnlyFileChannel.map(MapMode.READ_WRITE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1761 readOnlyFileChannel.map(MapMode.PRIVATE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1767 readOnlyFileChannel.map(MapMode.READ_WRITE, -1, CONTENT_LENGTH); in test_map_AbnormalMode()
1773 readOnlyFileChannel.map(MapMode.READ_WRITE, 0, -1); in test_map_AbnormalMode()
1780 readOnlyFileChannel.map(MapMode.READ_ONLY, 0, CONTENT_LENGTH + 1); in test_map_AbnormalMode()
[all …]
/libcore/ojluni/src/main/java/java/nio/channels/
DFileChannel.java790 public static class MapMode { class in FileChannel
795 public static final MapMode READ_ONLY
796 = new MapMode("READ_ONLY");
801 public static final MapMode READ_WRITE
802 = new MapMode("READ_WRITE");
807 public static final MapMode PRIVATE
808 = new MapMode("PRIVATE");
812 private MapMode(String name) { in MapMode() method in FileChannel.MapMode
915 public abstract MappedByteBuffer map(MapMode mode, in map()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DMappedByteBufferTest.java31 import java.nio.channels.FileChannel.MapMode;
47 MappedByteBuffer mmb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc in testasIntBuffer()
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()
130 MappedByteBuffer mmbRead = fileChannelRead.map(MapMode.READ_ONLY, 0, in test_force()
137 MappedByteBuffer resultRead = fileChannelR.map(MapMode.READ_ONLY, 0, in test_force()
149 FileChannel.MapMode.READ_WRITE, 0, fileChannelReadWrite.size()); in test_force()
157 FileChannel.MapMode.READ_WRITE, 0, fileChannelRW.size()); in test_force()
174 MappedByteBuffer mmbRead = fileChannelRead.map(MapMode.READ_ONLY, 0, in test_load()
[all …]
DByteBufferTest.java2078 tempFileChannel.map(FileChannel.MapMode.READ_WRITE, 0, tempFileChannel.size()); in testMappedByteBuffer_Put_ReadOnlyHeapByteBuffer()
/libcore/ojluni/src/main/java/sun/nio/ch/
DFileChannelImpl.java564 MappedByteBuffer dbb = map(MapMode.READ_ONLY, position, size); in transferToTrustedChannel()
685 MappedByteBuffer bb = src.map(MapMode.READ_ONLY, p, size); in transferFromFileChannel()
907 public MappedByteBuffer map(MapMode mode, long position, long size) in map()
923 if (mode == MapMode.READ_ONLY) in map()
925 else if (mode == MapMode.READ_WRITE) in map()
927 else if (mode == MapMode.PRIVATE) in map()
930 if ((mode != MapMode.READ_ONLY) && !writable) in map()
/libcore/benchmarks/src/benchmarks/regression/
DByteBufferBulkBenchmark.java62 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
DByteBufferBenchmark.java72 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()
/libcore/ojluni/annotations/hiddenapi/sun/nio/ch/
DFileChannelImpl.java181 java.nio.channels.FileChannel.MapMode mode, long position, long size) in map()
/libcore/luni/src/test/java/libcore/java/nio/
DBufferTest.java57 MappedByteBuffer result = ch.map(FileChannel.MapMode.READ_WRITE, 0, size); in allocateMapped()