20060330 Thursday March 30, 2006

The ISO-LATIN Novels

I've been wondering what is going to happen when Sue Grafton runs out of letters for her "alphabet novels". Today it struck me...she can move up to the ISO 8859-1 character set (aka ISO latin 1)!

I can't wait to find out what é (e-acute) and ö (o-umlat) are for :-).

If she runs out of these, the Unicode character set will surely keep her busy.

 

Posted by rickg ( Mar 30 2006, 05:27:23 AM PST ) Permalink Comments [0]
20060328 Tuesday March 28, 2006

Java Temp Directory

The java.io.File class has a handy createTempFile method for making temporary files, but there is no similar mechanism for creating temporary directories. Here is a quick and dirty way to subvert createTempFile and use it to create a temporary directory instead:

public static File createTempDirectory() throws IOException{
  File temp = File.createTempFile("my-","-tempFolder");
  temp.delete();
  temp.mkdir();
  temp.deleteOnExit();
  return temp;
}

I add the deleteOnExit method call to make sure I don't have a lot of temp directories lying around after I shutdown the virtual machine, but you can remove that if you want the temp dirs to be permanent.

Posted by rickg ( Mar 28 2006, 08:36:14 PM PST ) Permalink Comments [0]