I'm trying to read file from NFS using Java.
I'm try to use https://github.com/raisercostin/yanfs with the following code:
XFile xf = new XFile("nfs://192.168.1.183/nfs-share-folder/myfile.zip");
nfsXFileExtensionAccessor nfsx =
(nfsXFileExtensionAccessor)xf.getExtensionAccessor();
// login
nfsx.loginPCNFSD("mynfssrv", "evyatarel", "mypassword")) {
//Check for permission
if (xf.canRead())
System.out.println("Read permission OK");
else
System.out.println("No Read permission");
//How to read the file content?
I have permission to read the file but how can I get the file content?
Any suggestions/Another methods to read files from NFS?
Thanks!