org.jscience.devices.gps.garmin
Class GarminOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.jscience.devices.gps.garmin.GarminOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class GarminOutputStream
extends java.io.FilterOutputStream

This class take care of adding DLE-stuffing to all packets sent to the GPS. NOTE: Only the method write(GarminPacket) performs addition of DLE-stuffing. The remaining methods write directly to the GPS without format-control.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
GarminOutputStream(java.io.OutputStream o)
          Creates a new GarminOutputStream object.
 
Method Summary
 void write(GarminPacket packet)
          DOCUMENT ME!
 
Methods inherited from class java.io.FilterOutputStream
close, flush, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GarminOutputStream

public GarminOutputStream(java.io.OutputStream o)
Creates a new GarminOutputStream object.

Parameters:
o - DOCUMENT ME!
Method Detail

write

public void write(GarminPacket packet)
           throws java.io.IOException,
                  InvalidPacketException
DOCUMENT ME!

Parameters:
packet - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
InvalidPacketException - DOCUMENT ME!