36 |
if (!stationsFile.exists()) |
if (!stationsFile.exists()) |
37 |
return false; |
return false; |
38 |
|
|
39 |
int size = (int) stationsFile.length(); |
/*int size = (int) stationsFile.length(); |
40 |
/*byte data[] = new byte[size]; |
byte data[] = new byte[size]; |
41 |
|
|
42 |
RandomAccessFile raf = new RandomAccessFile(stationsFile, "r"); |
RandomAccessFile raf = new RandomAccessFile(stationsFile, "r"); |
43 |
raf.readFully(data); |
raf.readFully(data); |
66 |
File parent = context.getFilesDir(); |
File parent = context.getFilesDir(); |
67 |
File stationsFile = new File(parent, "stations.bin"); |
File stationsFile = new File(parent, "stations.bin"); |
68 |
|
|
69 |
|
|
70 |
byte data[] = HttpUtil.getContent(XmlUtil.SERVICE_BASE + "/LocateStations?dump=1", 5000); |
byte data[] = HttpUtil.getContent(XmlUtil.SERVICE_BASE + "/LocateStations?dump=1", 5000); |
71 |
Serializer serializer = new Persister(); |
Serializer serializer = new Persister(); |
72 |
stations = serializer.read(StationBean.class, new String(data, "ISO-8859-1") ); |
stations = serializer.read(StationBean.class, new String(data, "ISO-8859-1") ); |