Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/397.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java FileNotFoundException“/&引用;正在从URL中删除_Java_Filenotfoundexception - Fatal编程技术网

Java FileNotFoundException“/&引用;正在从URL中删除

Java FileNotFoundException“/&引用;正在从URL中删除,java,filenotfoundexception,Java,Filenotfoundexception,我得到以下例外 Failed to GET File Details from http://192.168.2.111/storage java.io.FileNotFoundException: http:/192.168.2.111/storage/data/18-Apr-2017-ops (No such file or directory) junit.framework.AssertionFailedError: Failed to GET File Details from ht

我得到以下例外

Failed to GET File Details from http://192.168.2.111/storage java.io.FileNotFoundException: http:/192.168.2.111/storage/data/18-Apr-2017-ops (No such file or directory)

junit.framework.AssertionFailedError: Failed to GET File Details from http://192.168.2.111/storage java.io.FileNotFoundException: http:/192.168.2.111/storage/data/18-Apr-2017-ops (No such file or directory)
at com.billing.getlogs.GetLogsTest.countLinesOperationsUpload(GetLogsTest.java:222)
at com.billing.getlogs.GetLogsTest.GetLogsLineCountTest(GetLogsTest.java:264)
如果查看,java.io.FileNotFoundException:之后的URL在http:之后只有一个/。URL是从属性文件中读取的。当/字符正确出现在url的其他部分时,是否有任何原因会将其删除。

明白了

我变了

InputStream is = new BufferedInputStream(new FileInputStream(text)); 


我一直在尝试读取URL的内容,但我的原始代码用于读取文件的内容。

堆栈跟踪是一回事,但如果没有代码块,我们显然看不到发生了什么……啊,我想我知道问题是什么:InputStream is=new BufferedInputStream(new FileInputStream(text));try{……}文本是url字符串。我认为我不应该使用FileInput流,因为它本身不是一个文件。不知道我应该用什么。请发布你的代码,如果我们不知道你在做什么,我们将无法帮助你。
InputStream is = new BufferedInputStream(new URL(text).openStream());