< prev index next >

src/java.base/share/classes/java/nio/MappedByteBuffer.java

Print this page
rev 57242 : imported patch 8234049.patch

*** 26,35 **** --- 26,37 ---- package java.nio; import java.io.FileDescriptor; import java.lang.ref.Reference; import java.util.Objects; + + import jdk.internal.access.foreign.MemorySegmentProxy; import jdk.internal.misc.Unsafe; /** * A direct byte buffer whose content is a memory-mapped region of a file.
*** 86,110 **** private final boolean isSync; // This should only be invoked by the DirectByteBuffer constructors // MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private ! FileDescriptor fd, boolean isSync) { ! super(mark, pos, lim, cap); this.fd = fd; this.isSync = isSync; } MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private ! boolean isSync) { ! super(mark, pos, lim, cap); this.fd = null; this.isSync = isSync; } ! MappedByteBuffer(int mark, int pos, int lim, int cap) { // package-private ! super(mark, pos, lim, cap); this.fd = null; this.isSync = false; } // Returns the distance (in bytes) of the buffer start from the --- 88,112 ---- private final boolean isSync; // This should only be invoked by the DirectByteBuffer constructors // MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private ! FileDescriptor fd, boolean isSync, MemorySegmentProxy segment) { ! super(mark, pos, lim, cap, segment); this.fd = fd; this.isSync = isSync; } MappedByteBuffer(int mark, int pos, int lim, int cap, // package-private ! boolean isSync, MemorySegmentProxy segment) { ! super(mark, pos, lim, cap, segment); this.fd = null; this.isSync = isSync; } ! MappedByteBuffer(int mark, int pos, int lim, int cap, MemorySegmentProxy segment) { // package-private ! super(mark, pos, lim, cap, segment); this.fd = null; this.isSync = false; } // Returns the distance (in bytes) of the buffer start from the
< prev index next >