-
- private static Map<Path, FileIO> map = new HashMap<Path, FileIO>();
-
- public static FileIO get(Path path) {
- synchronized(map) {
- FileIO existing = map.get(path);
- if(existing == null) {
- existing = new FileIO(path);
- map.put(path, existing);
- }
- return existing;
- }
- }
-