1 |
package dk.thoerup.traininfoservice; |
package dk.thoerup.traininfoservice; |
2 |
|
|
3 |
import java.io.ByteArrayOutputStream; |
|
4 |
import java.io.IOException; |
import java.io.IOException; |
5 |
|
import java.io.StringWriter; |
6 |
import java.sql.SQLException; |
import java.sql.SQLException; |
7 |
import java.util.logging.Level; |
import java.util.logging.Level; |
8 |
import java.util.logging.Logger; |
import java.util.logging.Logger; |
65 |
Statistics.getInstance().incrementStationLookupsFavorites(); |
Statistics.getInstance().incrementStationLookupsFavorites(); |
66 |
String list = transformToIntList( req.getParameter("list")); |
String list = transformToIntList( req.getParameter("list")); |
67 |
stations = stationDao.getByList(list); |
stations = stationDao.getByList(list); |
68 |
|
} else if (req.getParameter("dump") != null) { |
69 |
|
stations = stationDao.dumpAll(); |
70 |
} |
} |
71 |
return stations; |
return stations; |
72 |
} |
} |
76 |
|
|
77 |
Serializer serializer = new Persister(); |
Serializer serializer = new Persister(); |
78 |
|
|
79 |
ByteArrayOutputStream out = new ByteArrayOutputStream(); |
StringWriter out = new StringWriter(); |
80 |
|
|
81 |
try { |
try { |
82 |
serializer.write(stations, out); |
serializer.write(stations, out); |