package btools.server; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.StringTokenizer; import java.util.TreeSet; public class SuspectManager extends Thread { private static SimpleDateFormat dfTimestampZ = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss" ); private static String formatZ( Date date ) { synchronized( dfTimestampZ ) { return dfTimestampZ.format( date ); } } private static String formatAge( File f ) { long age = System.currentTimeMillis() - f.lastModified(); long minutes = age / 60000; if ( minutes < 60 ) { return minutes + " minutes"; } long hours = minutes / 60; if ( hours < 24 ) { return hours + " hours"; } long days = hours / 24; return days + " days"; } private static String getLevelDecsription( int level ) { switch( level ) { case 30 : return "motorway"; case 28 : return "trunk"; case 26 : return "primary"; case 24 : return "secondary"; case 22 : return "tertiary"; default: return "none"; } } public static void process( String url, BufferedWriter bw ) throws IOException { bw.write( "
\n" ); bw.write( "BRouter suspect manager. Help" + ctry + " | new | all | \n" ); } bw.write( "