try {
final URL url = new URL(surl);
File createTempFile = File.createTempFile("Download Test
File", ".stl");
FileUtils.copyURLToFile(url, createTempFile);
System.out.println(" Download check file lenght
"+createTempFile );
if (createTempFile.length() == 0) {
fail(" Downloaded file is empty");
}
} catch (final IOException e1) {
e1.printStackTrace();
fail("resource has invalid url");
有人可以告诉我为什么我在这里得到File.createFile的异常。 java.io.FileNotFoundException:https://xx.xx.com/uploads/xxx/
是个例外