public class KissEscapeOutputStream
extends java.io.OutputStream
| Modifier and Type | Class and Description |
|---|---|
static class |
KissEscapeOutputStream.RcvState
States of a KISS frame decoder.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
FEND |
static int |
FESC |
static int |
TFEND |
static int |
TFESC |
| Constructor and Description |
|---|
KissEscapeOutputStream(java.io.DataOutput out)
Create a KissEscapeOutputStream wrapped around an implementation of the java.io.DataOutput
interface.
|
KissEscapeOutputStream(java.io.OutputStream os)
Create a KissEscapeOutputStream wrapped around an OutputStream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getByteCount()
Get the number of bytes passed through this stream (counting escape codes injected by the stream).
|
byte |
getG8bpqCrc()
Get the G8BPQ CRC value for the last sent KISS frame.
|
void |
resetByteCount()
Reset the statistics fields for this stream.
|
void |
write(int b)
Write one byte to the output stream.
|
public static final int FEND
public static final int FESC
public static final int TFEND
public static final int TFESC
public KissEscapeOutputStream(java.io.DataOutput out)
out - DataOutput interface implementer to wrap with this streampublic KissEscapeOutputStream(java.io.OutputStream os)
os - OutputStream to receive KISS-encoded framespublic int getByteCount()
public void resetByteCount()
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamb - byte value to encodejava.io.IOException - if wrapped stream throws an IOExceptionpublic byte getG8bpqCrc()