private void showStorage (StringBuffer buf, boolean external)
    throws IOException
    {
	int		temp = rio.getFreeMemory (external);
	MemoryStatus	mem = rio.getMemoryStatus (external);

	// basic memory statistics
	buf.append ("<em>");
	buf.append (external ? "SmartMedia" : "Built-in Memory");
	buf.append ("</em>");
	buf.append (" ");
	buf.append (temp / (1024 * 1024));
	buf.append (".");
	buf.append ((10 * (temp % (1024 * 1024))) / (1024 * 1024));
	buf.append (" MB free<br>\n");

	// XXX "NN MBytes" ... forget the block count

	temp = mem.getBlockCount ();
	if (temp != 0)
	    temp = ((temp - mem.getNumUnusedBlocks ()) * 100) / temp;
	else
	    temp = 1000;
	
	// blocksize always 16K ?
	buf.append (mem.getNumUnusedBlocks ());
	buf.append ("/");
	buf.append (mem.getBlockCount ());
	buf.append (" blocks available, ");
	buf.append (temp);
	buf.append ("% full<br>");

	for (int i = 0; i < folders.length; i++) {
	    if (folders [i].isExternal () != external)
		continue;

	    buf.append ("Folder <em>");
	    buf.append (folders [i].getName1 ());
	    buf.append ("</em>");
	    buf.append (" ... has ");
	    buf.append (folders [i].getSongCount ());
	    buf.append (" songs.");
	    buf.append ("<br>\n");
	}
	
	buf.append ("<br>\n");
    }