【发布时间】:2017-01-31 16:31:04
【问题描述】:
我在 Windows 上有一个文件,我想从 linux 读取这个文件。下面的代码在我尝试从 Windows 运行时运行良好,但当我尝试从 linux 运行时它给出了;
"Could not read from "file:///10.0.0.1/C$/myfolder/test.txt" because it is not a file."
这是我的代码;
FileSystemOptions opts = new FileSystemOptions();
DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts, auth);
FileObject fo = VFS.getManager().resolveFile(remoteFilePath, opts);
InputStream inputStream = fo.getContent().getInputStream(); //this line throws exception
【问题讨论】:
标签: java filesystems apache-commons