Codota Logo
IOUtils.getCanonicalFileURL
Code IndexAdd Codota to your IDE (free)

How to use
getCanonicalFileURL
method
in
org.microemu.app.util.IOUtils

Best Java code snippets using org.microemu.app.util.IOUtils.getCanonicalFileURL (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.microemu/microemu-javase

public static String getCanonicalFileClassLoaderURL(File file) {
  String url = getCanonicalFileURL(file);
  if ((file.isDirectory()) && (!url.endsWith("/"))) {
    url += "/";
  }
  return url;
}

origin: org.microemu/microemu-javase

public void addClasspath(String classpath) {
  StringTokenizer st = new StringTokenizer(classpath, ";");
  while (st.hasMoreTokens()) {
    try {
      String path = st.nextToken();
      if (path.startsWith("file:")) {
        addURL(new URL(path));	
      } else {
        addURL(new URL(IOUtils.getCanonicalFileURL(new File(path))));
      }
    } catch (MalformedURLException e) {
      throw new Error(e);
    }
  }
}
 
origin: org.microemu/microemu-javase-swing

  public void actionPerformed(ActionEvent ev) {
    if (fileChooser == null) {
      ExtensionFileFilter fileFilter = new ExtensionFileFilter("MIDlet files");
      fileFilter.addExtension("jad");
      fileFilter.addExtension("jar");
      fileChooser = new JFileChooser();
      fileChooser.setFileFilter(fileFilter);
      fileChooser.setDialogTitle("Open MIDlet File...");
      fileChooser.setCurrentDirectory(new File(Config.getRecentDirectory("recentJadDirectory")));
    }
    int returnVal = fileChooser.showOpenDialog(Main.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
      Config.setRecentDirectory("recentJadDirectory", fileChooser.getCurrentDirectory().getAbsolutePath());
      String url = IOUtils.getCanonicalFileURL(fileChooser.getSelectedFile());
      Common.openMIDletUrlSafe(url);
      if (recordStoreManagerDialog != null) {
        recordStoreManagerDialog.refresh();
      }
    }
  }
};
origin: org.microemu/microemu-javase

  File file = new File((String) argsIterator.next());
  argsIterator.remove();
  propertiesJad = file.exists() ? IOUtils.getCanonicalFileURL(file) : arg;
} else if (arg.equals("--appclassloader")) {
  if (clConfig == null) {
origin: org.microemu/microemu-javase-swt

  public void handleEvent(Event ev)
  {
    if (fileDialog == null) {
      fileDialog = new FileDialog(shell, SWT.OPEN);
      fileDialog.setText("Open JAD File...");
      fileDialog.setFilterNames(new String[] {"JAD files"});
      fileDialog.setFilterExtensions(new String[] {"*.jad"});
      fileDialog.setFilterPath(Config.getRecentDirectory("recentJadDirectory"));
    }
 
    fileDialog.open();
    if (fileDialog.getFileName().length() > 0) {
      File selectedFile;
      if (fileDialog.getFilterPath() == null) {
        selectedFile = new File(fileDialog.getFileName());
      } else {
        selectedFile = new File(fileDialog.getFilterPath(), fileDialog.getFileName());
        Config.setRecentDirectory("recentJadDirectory", fileDialog.getFilterPath());
      }
      String url = IOUtils.getCanonicalFileURL(selectedFile);
      Common.openJadUrlSafe(url);
    }
  } 
};
origin: org.microemu/microemu-javase-swing

File f = (File) fileList.get(0);
if (Common.isMIDletUrlExtension(f.getName())) {
  Common.openMIDletUrlSafe(IOUtils.getCanonicalFileURL(f));
} else {
  Message.warn("Unable to open " + f.getAbsolutePath() + ", Only JAD files are acepted");	
origin: org.microemu/microemu-javase

try {
  File file = new File(midletClassOrUrl);
  String url = file.exists() ? IOUtils.getCanonicalFileURL(file) : midletClassOrUrl;
  openMIDletUrl(url);
} catch (IOException exception) {
org.microemu.app.utilIOUtilsgetCanonicalFileURL

Javadoc

Solution for JVM bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6351751

Popular methods of IOUtils

  • closeQuietly
    Unconditionally close a Writer. Equivalent to Writer#close(), except any exceptions will be ignored.
  • copyFile
  • copyToFile
  • getCanonicalFileClassLoaderURL

Popular in Java

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now