examples.cityguide
Class Util

java.lang.Object
  extended by examples.cityguide.Util

public class Util
extends java.lang.Object

general utilities for CityGuide


Constructor Summary
Util()
           
 
Method Summary
static void addLandmarkFromString(javax.microedition.location.LandmarkStore store, java.lang.String record)
          This method creates landmark from values in String record.
static java.lang.String[] asArray(java.util.Enumeration e)
           
static java.util.Enumeration parseSVRecord(java.lang.String str, char delimiter)
          This method parses separated values from record.
static void readLandmarksFromStream(javax.microedition.location.LandmarkStore store, java.io.InputStream is, javax.microedition.lcdui.Gauge progressGauge)
          This method reads landmarks from InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

readLandmarksFromStream

public static final void readLandmarksFromStream(javax.microedition.location.LandmarkStore store,
                                                 java.io.InputStream is,
                                                 javax.microedition.lcdui.Gauge progressGauge)
                                          throws java.io.IOException
This method reads landmarks from InputStream. Landmarks are stored in text file as values with delimiter "," Method updates progress bar.

Parameters:
is - character stream containing records of landmarks
progressGauge - if not null external progress indicator is updated.
Throws:
java.io.IOException

addLandmarkFromString

public static final void addLandmarkFromString(javax.microedition.location.LandmarkStore store,
                                               java.lang.String record)
                                        throws java.io.IOException
This method creates landmark from values in String record. Values are separated by comma. Sequence of the values is firm. Latitude, Longitude, Altitude,Name, Description, Street & house number, City, Post Code, Phone Number, Category

Parameters:
record - comma separated values
Throws:
java.io.IOException

parseSVRecord

public static final java.util.Enumeration parseSVRecord(java.lang.String str,
                                                        char delimiter)
This method parses separated values from record.

Parameters:
str - record containing separated values
delimiter - values delimiter char
Returns:
String values from record as Enumeration

asArray

public static final java.lang.String[] asArray(java.util.Enumeration e)