// ignore
}
throw e;
}
ExportEntry exportEntry = null;
for (ExportEntry e : exportList) {
if (path.startsWith(e.getDirectory())) {
if (exportEntry == null) {
exportEntry = e;
} else {
if (exportEntry.getDirectory().length() < e.getDirectory().length()) {
exportEntry = e;
}
}
}
}
if (exportEntry == null) {
throw new IOException("The path " + path + " it is not exported");
}
mountDirectory = exportEntry.getDirectory();
MountResult mountResult;
try {
mountResult = mountClient.mount(mountDirectory);
} catch (MountException e) {
try {
mountClient.close();
} catch (IOException e1) {
// ignore
}
throw new IOException(e.getMessage());
} catch (IOException e) {
try {
mountClient.close();
} catch (IOException e1) {
// ignore
}
throw e;
}
byte[] tempFileHandle = mountResult.getFileHandle();
try {
String filePath = path.substring(exportEntry.getDirectory().length());
StringTokenizer tokenizer = new StringTokenizer(filePath, "/");
while (tokenizer.hasMoreElements()) {
String t = tokenizer.nextToken();
LookupResult lookup = nfsClient.lookup(tempFileHandle, t);
if (lookup.getFileAttribute().getType() == FileAttribute.FILE) {