org.dinopolis.gpstool.gpsinput
Interface GPSDevice

All Known Implementing Classes:
GPSFileDevice, GPSSerialDevice

public interface GPSDevice

All classes implementing this interface are sources of gps-data, like a gps-receiver, a file containing logging information of gps-receivers, ....

Version:
$Revision: 1.5 $
Author:
Christof Dallermassl

Method Summary
 void close()
          Closes the connection to the GPSDevice.
 java.io.InputStream getInputStream()
          Returns an input stream from the gps device.
 java.io.OutputStream getOutputStream()
          Returns an output stream from the gps device.
 void init(java.util.Hashtable environment)
          Initialize the GPSDevice and hand over all information needed for the specific GPSDevice to opens the connection.
 void open()
          Opens the gps device (e.g. serial connection to gps-receiver or file containing logging information from a gps-receiver).
 

Method Detail

init

public void init(java.util.Hashtable environment)
          throws GPSException
Initialize the GPSDevice and hand over all information needed for the specific GPSDevice to opens the connection.

Parameters:
environment - contains all informations needed to initialize the gps device.
Throws:
GPSException - if the initialization was not successfull, e.g. some information in the environment is missing.

open

public void open()
          throws GPSException
Opens the gps device (e.g. serial connection to gps-receiver or file containing logging information from a gps-receiver).

Throws:
GPSException - if the opening of the device was not successfull.

close

public void close()
           throws GPSException
Closes the connection to the GPSDevice.

Throws:
GPSException - if closing the device was not successfull.

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream from the gps device.

Returns:
an input stream from the gps device.
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Returns an output stream from the gps device.

Returns:
an output stream from the gps device.
Throws:
java.io.IOException