160 |
return res; |
return res; |
161 |
} |
} |
162 |
|
|
163 |
|
public MappedByteBuffer map (FileChannel.MapMode mode, long position, |
164 |
|
long size) |
165 |
public MappedByteBuffer map(java.nio.channels.FileChannel.MapMode mode, |
throws IOException |
166 |
long position, |
{ |
167 |
int size) throws IOException |
// int cmode = mode.m; |
168 |
{ |
// address = nio_mmap_file (fd, position, size, cmode); |
169 |
int cmode = mode.m; |
// length = size; |
170 |
|
// buf = new MappedByteFileBuffer (this); |
171 |
address = nio_mmap_file(fd, position, size, cmode); |
// return buf; |
172 |
|
return null; |
173 |
length = size; |
} |
|
|
|
|
// System.out.println("file mapped" + address + "length="+length); |
|
|
|
|
|
buf = new MappedByteFileBuffer(this); |
|
|
return buf; |
|
|
} |
|
174 |
|
|
175 |
static MappedByteBuffer create_direct_mapped_buffer(long address, |
static MappedByteBuffer create_direct_mapped_buffer(long address, |
176 |
long length) |
long length) |