Java:JCifs.jar:花了很长时间在smb上读取文件

时间:2017-09-29 13:43:20

标签: java jcifs

我正在使用jcifs库来使用smb从网络系统中读取文件数据。代码段如下。我观察到读取API对性能的巨大影响。 read()需要很长时间。看了这么多博客后我更正了代码,仍然没有改进。你能帮忙吗?

SmbFile smbFileTest = new SmbFile(fileurl, authentication); //Takes 20sec
SmbFileInputStream input = new SmbFileInputStream(smbFileTest);
byte[] data = new byte[length];
int count = input.read(data); //takes nearly 15-20min to read a 135MB file. Also the length, i have provided is only to read 128KB. Still its taking huge time.

The below are my jcif config, i did after reading other post
System.setProperty("jcifs.resolveOrder", "DNS");
System.setProperty("jcifs.smb.client.dfs.disabled", "false"); //Changed true to false no improvement
System.setProperty("jcifs.smb.client.responseTimeout", "120000");
System.setProperty("jcifs.smb.client.disablePlainTextPasswords", "false");
System.setProperty("jcifs.util.loglevel", "3"); 

由于

0 个答案:

没有答案
相关问题