Examples of NFS2Client


Examples of org.jnode.net.nfs.nfs2.NFS2Client

        tableEntry.addEntry(entry);
        return entry;
    }

    public FSEntry addFile(String name) throws IOException {
        NFS2Client nfsClient = getNFS2Client();

        CreateFileResult result;
        try {
            result = nfsClient.createFile(directoryEntry.getFileHandle(), name, DEFAULT_PERMISSION,
                -1, -1, -1, new Time(-1, -1), new Time(-1, -1));
        } catch (NFS2Exception e) {
            throw new IOException("Can not create the file " + name + "." + e.getMessage(), e);
        }
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.NFS2Client

        NFS2Entry entry = getEntry(name);
        if (entry == null) {
            return;
        }

        NFS2Client nfsClient = getNFS2Client();

        if (entry.isDirectory()) {
            try {
                nfsClient.removeDirectory(directoryEntry.getFileHandle(), name);
            } catch (NFS2Exception e) {
                throw new IOException("Can not remove directory " + name + "." + e.getMessage(), e);
            }
        } else {
            try {
                nfsClient.removeFile(directoryEntry.getFileHandle(), name);
            } catch (NFS2Exception e) {
                throw new IOException("Can not remove file " + name + "." + e.getMessage(), e);
            }
        }
        tableEntry.removeEntry(name);
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.NFS2Client

                }
            }
        });

        mountClient = new Mount1Client(device.getHost(), device.getProtocol(), device.getUid(), device.getGid());
        nfsClient = new NFS2Client(device.getHost(), device.getProtocol(), device.getUid(), device.getGid());

        // Mount the file system
        MountResult result;
        FileAttribute fileAttribute;
        try {
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.NFS2Client

        } else {
            throw new IOException("The url doesn't contains the uid and guid.");
        }

        mountClient = new Mount1Client(InetAddress.getByName(url.getHost()), Protocol.TCP, uid, gid);
        nfsClient = new NFS2Client(InetAddress.getByName(url.getHost()), Protocol.TCP, uid, gid);
        String path = url.getPath();
        List<ExportEntry> exportList;
        try {
            exportList = mountClient.export();
        } catch (MountException e1) {
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.NFS2Client

    public NFS2InputStream(URL url) throws IOException {
        // FIXME ... exception handling in this method should be reviewed.  At the very least,
        // there are places where finally clauses should be used.
        mountClient = new Mount1Client(InetAddress.getByName(url.getHost()), Protocol.TCP, -1, -1);
        nfsClient = new NFS2Client(InetAddress.getByName(url.getHost()), Protocol.TCP, -1, -1);
        String path = url.getPath();
        List<ExportEntry> exportList;
        try {
            exportList = mountClient.export();
        } catch (MountException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.