I get an exception: "URI scheme file is not"
What I'm doing is a file Get the name of and then save that file from another server to another on your computer / server from within the Sextile.
I have a string named "url", since then my code is:
url = streams.asString (stream); // Get a URL from a form on the webpage System.out.println ("This URL is:" + url); URI File URI = New URI (URL); File fileframe = new file (file yuri); Only file = fileFremiumRi Url fileUrl = new URL (url); InputStream ImageStream = FileUrl.openstream (); String fileLoc2 = getServletContext (). GetRealPath ("picture /" + file only); File newfolder = new file (getServletContext (). GetRealPath ("picture")); If (NewFolder.exists ()) {newFolder.mkdir (); } IOUtils.copy (ImageStream, New FileAproduct Stream ("Picture /" + File Only)); }
The reason behind the error is:
file fileframe = new file (file Yuri);
I've added the rest code so that you can see what I'm trying to do.
URI "scheme" is the thing that comes before ":", for example "http " "" In.
The error message is telling you that new file (file Yuri)
works on "files" only: "URI (referring to the name of the current system)", " No other plans like "HTC"
Actually, there is another way to specify the path name of the "file:" URI file
class.
Comments
Post a Comment