diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-05-03 23:02:44 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-05-03 23:02:44 +0200 |
commit | 3b8b6cef107bdf209e6258c5bb4d51e880f6ecf6 (patch) | |
tree | 1bdf5d3cc9366d865d42423194a7eda224a13515 /odk/examples/DevelopersGuide | |
parent | b945adac81c3b38d32ccc7d60f3d99fedd86a30f (diff) |
Change <file>.toURL() to <file>.toURI().toURL()
Diffstat (limited to 'odk/examples/DevelopersGuide')
4 files changed, 5 insertions, 5 deletions
diff --git a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java index 65c9ecf99b4f..c470c7cb6f1b 100644 --- a/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java +++ b/odk/examples/DevelopersGuide/Drawing/GraphicExportDemo.java @@ -100,7 +100,7 @@ public class GraphicExportDemo aProps[0].Value = "WMF"; */ java.io.File destFile = new java.io.File(args[1]); - java.net.URL destUrl = destFile.toURL(); + java.net.URL destUrl = destFile.toURI().toURL(); aProps[1] = new PropertyValue(); aProps[1].Name = "URL"; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java index 8b6de7bad121..a7cd1ce0eb46 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/FunctionHelper.java @@ -1025,7 +1025,7 @@ public class FunctionHelper // get file URL from the dialog try { - sFileURL = aChooser.getSelectedFile().toURL().toExternalForm(); + sFileURL = aChooser.getSelectedFile().toURI().toURL().toExternalForm(); } catch( MalformedURLException ex ) { diff --git a/odk/examples/DevelopersGuide/Text/TextDocuments.java b/odk/examples/DevelopersGuide/Text/TextDocuments.java index 4696b41ffe59..40940fda3866 100644 --- a/odk/examples/DevelopersGuide/Text/TextDocuments.java +++ b/odk/examples/DevelopersGuide/Text/TextDocuments.java @@ -425,7 +425,7 @@ public class TextDocuments { if ( xDoc != null ) { sourceFile = new java.io.File(sOutputDir); StringBuffer sStoreFileUrl = new StringBuffer(); - sStoreFileUrl.append(sourceFile.toURL().toString()); + sStoreFileUrl.append(sourceFile.toURI().toURL().toString()); sStoreFileUrl.append("somepopularfileformat.doc"); storeDocComponent(xDoc, sStoreFileUrl.toString() ); diff --git a/odk/examples/DevelopersGuide/UCB/Helper.java b/odk/examples/DevelopersGuide/UCB/Helper.java index ea5f5536365b..ccab5c0feb1e 100644 --- a/odk/examples/DevelopersGuide/UCB/Helper.java +++ b/odk/examples/DevelopersGuide/UCB/Helper.java @@ -179,7 +179,7 @@ public class Helper { try { File file = new File( systemPath ); - String url = file.toURL().toString(); + String url = file.toURI().toURL().toString(); if ( url.charAt( 6 ) != '/' ) { // file:/xxx vs. file:///xxxx StringBuffer buf1 = new StringBuffer( "file:///" ); buf1.append( url.substring( 6 ) ); @@ -217,7 +217,7 @@ public class Helper { buf.append( "resource-" ); buf.append( System.currentTimeMillis() ); File file = new File( buf.toString() ); - String url = file.toURL().toString(); + String url = file.toURI().toURL().toString(); if ( url.charAt( 6 ) != '/' ) { // file:/xxx vs. file:///xxxx StringBuffer buf1 = new StringBuffer( "file:///" ); buf1.append( url.substring( 6 ) ); |