Home
last modified time | relevance | path

Searched refs:MapMode (Results 1 – 11 of 11) 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;
1631 writeOnlyFileChannel.map(MapMode.READ_ONLY, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1637 writeOnlyFileChannel.map(MapMode.READ_WRITE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1643 writeOnlyFileChannel.map(MapMode.PRIVATE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1650 writeOnlyFileChannel.map(MapMode.READ_WRITE, 0, -1); in test_map_AbnormalMode()
1657 readOnlyFileChannel.map(MapMode.READ_WRITE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1663 readOnlyFileChannel.map(MapMode.PRIVATE, 0, CONTENT_LENGTH); in test_map_AbnormalMode()
1669 readOnlyFileChannel.map(MapMode.READ_WRITE, -1, CONTENT_LENGTH); in test_map_AbnormalMode()
1675 readOnlyFileChannel.map(MapMode.READ_WRITE, 0, -1); in test_map_AbnormalMode()
1682 readOnlyFileChannel.map(MapMode.READ_ONLY, 0, CONTENT_LENGTH + 1); in test_map_AbnormalMode()
[all …]
/libcore/luni/src/main/java/java/nio/channels/
DFileChannel.java85 public static class MapMode { class in FileChannel
89 public static final MapMode PRIVATE = new MapMode("PRIVATE");
94 public static final MapMode READ_ONLY = new MapMode("READ_ONLY");
99 public static final MapMode READ_WRITE = new MapMode("READ_WRITE");
107 private MapMode(String displayName) { in MapMode() method in FileChannel.MapMode
280 public abstract MappedByteBuffer map(FileChannel.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 …]
/libcore/luni/src/main/java/java/nio/
DMappedByteBuffer.java20 import java.nio.channels.FileChannel.MapMode;
40 final MapMode mapMode;
43 MappedByteBuffer(MemoryBlock block, int capacity, MapMode mapMode, long effectiveDirectAddress) { in MappedByteBuffer()
107 if (mapMode == MapMode.READ_WRITE) { in force()
DMemoryBlock.java24 import java.nio.channels.FileChannel.MapMode;
100 …public static MemoryBlock mmap(FileDescriptor fd, long offset, long size, MapMode mapMode) throws … in mmap()
111 if (mapMode == MapMode.PRIVATE) { in mmap()
114 } else if (mapMode == MapMode.READ_ONLY) { in mmap()
DFileChannelImpl.java220 … public final MappedByteBuffer map(MapMode mapMode, long position, long size) throws IOException { in map()
230 if (mapMode != MapMode.READ_ONLY) { in map()
258 … return new DirectByteBuffer(block, (int) size, offset, (mapMode == MapMode.READ_ONLY), mapMode); in map()
387 ByteBuffer buffer = fileSrc.map(MapMode.READ_ONLY, filePosition, count); in transferFrom()
446 buffer = map(MapMode.READ_ONLY, position, count); in transferTo()
DDirectByteBuffer.java20 import java.nio.channels.FileChannel.MapMode;
32 …irectByteBuffer(MemoryBlock block, int capacity, int offset, boolean isReadOnly, MapMode mapMode) { in DirectByteBuffer()
/libcore/luni/src/main/java/libcore/util/
DZoneInfoDB.java24 import java.nio.channels.FileChannel.MapMode;
/libcore/luni/src/test/java/libcore/java/nio/
DBufferTest.java49 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/benchmarks/src/benchmarks/regression/
DByteBufferBenchmark.java68 result = fc.map(FileChannel.MapMode.READ_WRITE, 0, fc.size()); in newBuffer()