public UsageServer(int port,File usageDir,int threads) throws IOException {
  if (!Charset.isSupported(UTF_8)) {
    throw new IOException("UTF-8 character encoding not supported");
  }
  System.setProperty("sun.net.httpserver.maxReqTime","30");
  System.setProperty("sun.net.httpserver.maxRspTime","30");
  mUsageDir=usageDir;
  mPort=port;
  mThreadPoolExecutor=new ThreadPoolExecutor(threads,threads,0,TimeUnit.SECONDS,new LinkedBlockingQueue<Runnable>(),new UsageServerThreadFactory());
}

public UsageServer ( int port , File usageDir , int threads ) throws IOException { if ( ! Charset . isSupported ( UTF_8 ) ) { throw new IOException ( "UTF-8 character encoding not supported" ) ; } System . setProperty ( "sun.net.httpserver.maxReqTime" , "30" ) ; System . setProperty ( "sun.net.httpserver.maxRspTime" , "30" ) ; mUsageDir = usageDir ; mPort = port ; mThreadPoolExecutor = new ThreadPoolExecutor ( threads , threads , 0 , TimeUnit . SECONDS , new LinkedBlockingQueue < Runnable > ( ) , new UsageServerThreadFactory ( ) ) ; }
constructs and obtains lock on usage file for current month .
