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 {
result = mountClient.mount(device.getRemoteDirectory());
fileAttribute = nfsClient.getAttribute(result.getFileHandle());
} catch (IOException e) {
try {
close();
} catch (IOException e1) {
// ignore
}
throw new FileSystemException(e.getMessage(), e);
} catch (MountException e) {
try {
close();
} catch (IOException e1) {
// ignore
}
throw new FileSystemException(e.getMessage(), e);
} catch (NFS2Exception e) {
try {
close();
} catch (IOException e1) {
// ignore
}
throw new FileSystemException(e.getMessage(), e);
}
root = new NFS2RootEntry(this, result.getFileHandle(), fileAttribute);
}