public void showCache ( PrintStream pw ) { pw . println ( "Cache files" ) ; pw . println ( "Size LastModified Filename" ) ; File dir = new File ( root ) ; File [ ] files = dir . listFiles ( ) ; if ( files != null ) for ( File file : files ) { String org = null ; try { org = URLDecoder . decode ( file . getName ( ) , "UTF8" ) ; } catch ( UnsupportedEncodingException e ) { e . printStackTrace ( ) ; } pw . println ( " " + file . length ( ) + " " + new Date ( file . lastModified ( ) ) + " " + org ) ; } }
Show cache contents for debugging .