jwo.landserf.process.gps.garmin
Class GarminSerialOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
jwo.landserf.process.gps.garmin.GarminSerialOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class GarminSerialOutputStream
- extends FilterOutputStream
Handles low level serial output to GPS. Automatically adds DLEs to
the GPS output stream. The only method providing the DLE stuffing is
write(). The remaining methods write directly to the GPS without
format control.
- Version:
- 2.3, 24th August, 2006.
- Author:
- Jo Wood, based on the design by Henrik Sorensen (haas@itu.dk).
Method Summary |
void |
write(GarminPacket packet)
Writes a packet of data to the output stream and performs DLE stuffing
where necessary. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GarminSerialOutputStream
public GarminSerialOutputStream(OutputStream o)
- Creates a DLE stuffing output stream to the GPS.
- Parameters:
o
- Output stream.
write
public void write(GarminPacket packet)
throws IOException
- Writes a packet of data to the output stream and performs DLE stuffing
where necessary.
- Parameters:
packet
- Packet to write.
- Throws:
IOException
- if problem writing to output stream.
Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009