|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.ka2ddo.yaac.io.KissEscapeOutputStream
public class KissEscapeOutputStream
This filtering OutputStream adds the KISS protocol escape sequences for the body of a KISS frame. It also calculates G8BPQ's CRC for the frame if needed for MKISS operations.
Nested Class Summary | |
---|---|
static class |
KissEscapeOutputStream.RcvState
States of a KISS frame decoder. |
Field Summary | |
---|---|
static int |
FEND
|
static int |
FESC
|
static int |
TFEND
|
static int |
TFESC
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.io.OutputStream |
---|
close, flush, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FEND
public static final int FESC
public static final int TFEND
public static final int TFESC
Constructor Detail |
---|
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 framesMethod Detail |
---|
public int getByteCount()
public void resetByteCount()
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
b
- byte value to encode
java.io.IOException
- if wrapped stream throws an IOExceptionpublic byte getG8bpqCrc()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |