Debian Codegraph @

src/main/org/h2/store/fs/niomapped/FilePathNioMapped.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6 package org.h2.store.fs.niomapped;
7
8 import java.io.IOException;
9 import java.nio.channels.FileChannel;
10 import org.h2.store.fs.FilePathWrapper;
11
12 /**
13 * This file system stores files on disk and uses java.nio to access the files.
14 * This class used memory mapped files.
15 */
16 public class FilePathNioMapped extends FilePathWrapper {
17
18 @Override
19 public FileChannel open(String mode) throws IOException {
20 return new FileNioMapped(name.substring(getScheme().length() + 1), mode);
21 }
22
23 @Override
24 public String getScheme() {
25 return "nioMapped";
26 }
27
28 }