jdk/test/java/nio/file/spi/TestProvider.java
author ohair
Wed, 06 Apr 2011 22:06:11 -0700
changeset 9035 1255eb81cc2f
parent 8158 77d9c0f1c19f
child 36511 9d0388c6b336
permissions -rw-r--r--
7033660: Update copyright year to 2011 on any files changed in 2011 Reviewed-by: dholmes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     1
/*
9035
1255eb81cc2f 7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents: 8158
diff changeset
     2
 * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     4
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     8
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    13
 * accompanied this code).
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    14
 *
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2057
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2057
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2057
diff changeset
    21
 * questions.
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    22
 */
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    23
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    24
import java.nio.file.spi.FileSystemProvider;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    25
import java.nio.file.*;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    26
import java.nio.file.attribute.*;
8158
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    27
import java.nio.channels.SeekableByteChannel;
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    28
import java.net.URI;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    29
import java.util.*;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    30
import java.io.IOException;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    31
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    32
public class TestProvider extends FileSystemProvider {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    33
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    34
    private final FileSystem theFileSystem;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    35
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    36
    public TestProvider(FileSystemProvider defaultProvider) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    37
        theFileSystem = new TestFileSystem(this);
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    38
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    39
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    40
    @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    41
    public String getScheme() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    42
        return "file";
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    43
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    44
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    45
    @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    46
    public FileSystem newFileSystem(URI uri, Map<String,?> env) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    47
        throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    48
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    49
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    50
    @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    51
    public FileSystem getFileSystem(URI uri) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    52
        return theFileSystem;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    53
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    54
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    55
    @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    56
    public Path getPath(URI uri) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    57
        throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    58
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
    59
8158
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    60
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    61
    public void setAttribute(Path file, String attribute, Object value,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    62
                             LinkOption... options)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    63
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    64
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    65
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    66
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    67
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    68
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    69
    public Map<String,Object> readAttributes(Path file, String attributes,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    70
                                             LinkOption... options)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    71
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    72
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    73
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    74
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    75
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    76
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    77
    public <A extends BasicFileAttributes> A readAttributes(Path file,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    78
                                                            Class<A> type,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    79
                                                            LinkOption... options)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    80
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    81
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    82
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    83
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    84
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    85
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    86
    public <V extends FileAttributeView> V getFileAttributeView(Path file,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    87
                                                                Class<V> type,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    88
                                                                LinkOption... options)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    89
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    90
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    91
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    92
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    93
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    94
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    95
    public void delete(Path file) throws IOException {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    96
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    97
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    98
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
    99
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   100
    public void createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   101
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   102
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   103
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   104
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   105
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   106
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   107
    public void createLink(Path link, Path existing) throws IOException {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   108
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   109
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   110
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   111
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   112
    public Path readSymbolicLink(Path link) throws IOException {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   113
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   114
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   115
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   116
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   117
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   118
    public void copy(Path source, Path target, CopyOption... options)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   119
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   120
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   121
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   122
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   123
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   124
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   125
    public void move(Path source, Path target, CopyOption... options)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   126
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   127
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   128
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   129
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   130
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   131
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   132
    public DirectoryStream<Path> newDirectoryStream(Path dir,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   133
                                                    DirectoryStream.Filter<? super Path> filter)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   134
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   135
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   136
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   137
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   138
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   139
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   140
    public void createDirectory(Path dir, FileAttribute<?>... attrs)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   141
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   142
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   143
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   144
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   145
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   146
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   147
    public SeekableByteChannel newByteChannel(Path file,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   148
                                              Set<? extends OpenOption> options,
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   149
                                              FileAttribute<?>... attrs)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   150
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   151
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   152
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   153
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   154
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   155
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   156
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   157
    public boolean isHidden(Path file) throws IOException {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   158
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   159
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   160
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   161
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   162
    public FileStore getFileStore(Path file) throws IOException {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   163
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   164
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   165
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   166
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   167
    public boolean isSameFile(Path file, Path other) throws IOException {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   168
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   169
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   170
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   171
    @Override
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   172
    public void checkAccess(Path file, AccessMode... modes)
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   173
        throws IOException
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   174
    {
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   175
        throw new RuntimeException("not implemented");
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   176
    }
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   177
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   178
    static class TestFileSystem extends FileSystem {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   179
        private final TestProvider provider;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   180
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   181
        TestFileSystem(TestProvider provider) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   182
            this.provider = provider;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   183
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   184
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   185
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   186
        public FileSystemProvider provider() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   187
            return provider;
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   188
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   189
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   190
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   191
        public void close() throws IOException {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   192
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   193
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   194
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   195
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   196
        public boolean isOpen() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   197
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   198
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   199
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   200
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   201
        public boolean isReadOnly() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   202
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   203
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   204
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   205
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   206
        public String getSeparator() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   207
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   208
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   209
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   210
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   211
        public Iterable<Path> getRootDirectories() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   212
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   213
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   214
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   215
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   216
        public Iterable<FileStore> getFileStores() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   217
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   218
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   219
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   220
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   221
        public Set<String> supportedFileAttributeViews() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   222
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   223
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   224
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   225
        @Override
8158
77d9c0f1c19f 7006126: (fs) Updates to file system API (1/2011)
alanb
parents: 5506
diff changeset
   226
        public Path getPath(String first, String... more) {
2057
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   227
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   228
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   229
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   230
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   231
        public PathMatcher getPathMatcher(String syntaxAndPattern) {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   232
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   233
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   234
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   235
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   236
        public UserPrincipalLookupService getUserPrincipalLookupService() {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   237
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   238
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   239
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   240
        @Override
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   241
        public WatchService newWatchService() throws IOException {
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   242
            throw new RuntimeException("not implemented");
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   243
        }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   244
    }
3acf8e5e2ca0 6781363: New I/O: Update socket-channel API to jsr203/nio2-b99
alanb
parents:
diff changeset
   245
}