Package org.yamcs.tctm
Class CfdpPacketInputStream
java.lang.Object
org.yamcs.tctm.CfdpPacketInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
,PacketInputStream
CFDP packet reader that splits the stream into packets based on the length of the packet
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
init
(InputStream inputStream, YConfiguration config) Called each time an input stream is opened to initialize the objectbyte[]
read the next packet - blocking if necessary until all the data is available.
-
Constructor Details
-
CfdpPacketInputStream
public CfdpPacketInputStream()
-
-
Method Details
-
init
Description copied from interface:PacketInputStream
Called each time an input stream is opened to initialize the object- Specified by:
init
in interfacePacketInputStream
-
readPacket
Description copied from interface:PacketInputStream
read the next packet - blocking if necessary until all the data is available.- Specified by:
readPacket
in interfacePacketInputStream
- Returns:
- the next packet read from the input stream.
- Throws:
EOFException
- if this input stream reaches the end.IOException
- an I/O error has occurred
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-