58 |
return fileStr.substring(fileStr.length() - 3).equals(".gz"); |
return fileStr.substring(fileStr.length() - 3).equals(".gz"); |
59 |
} |
} |
60 |
|
|
61 |
protected File[] getFiles(int count) { |
public static File[] getFiles(int count) { |
62 |
File accessLogDir = new File("/home/app/domain1/logs/access/"); |
File accessLogDir = new File("/home/app/domain1/logs/access/"); |
63 |
//File accessLogDir = new File("/home/torben/inst/glassfishv3/glassfish/domains/domain1/logs/access/"); |
//File accessLogDir = new File("/home/torben/inst/glassfishv3/glassfish/domains/domain1/logs/access/"); |
64 |
|
|
325 |
*/ |
*/ |
326 |
|
|
327 |
|
|
|
formatPositions(sb, "blue", positions.blue); |
|
|
formatPositions(sb, "green", positions.green); |
|
|
formatPositions(sb, "yellow", positions.yellow); |
|
328 |
formatPositions(sb, "red", positions.red); |
formatPositions(sb, "red", positions.red); |
329 |
|
formatPositions(sb, "yellow", positions.yellow); |
330 |
|
formatPositions(sb, "green", positions.green); |
331 |
|
formatPositions(sb, "blue", positions.blue); |
332 |
|
|
333 |
|
|
334 |
sb.append( "</Document>\n" ); |
sb.append( "</Document>\n" ); |
404 |
byte bytes[] = baos.toByteArray(); |
byte bytes[] = baos.toByteArray(); |
405 |
|
|
406 |
resp.setContentType(KMZ); |
resp.setContentType(KMZ); |
407 |
resp.setContentLength( bytes.length ); |
resp.setHeader("Content-Disposition", "attachment; filename=Traininfo-requestplotter.kmz"); |
408 |
|
resp.setContentLength( bytes.length ); |
409 |
resp.getOutputStream().write(bytes); |
resp.getOutputStream().write(bytes); |
410 |
|
|
411 |
} else { |
} else { |
412 |
resp.setContentType(KML); |
byte bytes[] = kmlData.getBytes(); |
413 |
resp.getWriter().print( kmlData ); |
|
414 |
|
resp.setContentType(KML); |
415 |
|
resp.setContentLength( bytes.length ); |
416 |
|
resp.getOutputStream().write(bytes); |
417 |
} |
} |
418 |
} |
} |
419 |
} |
} |