Package org.yamcs.tctm
Class CfdpPacketInputStream
- java.lang.Object
-
- org.yamcs.tctm.CfdpPacketInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable,PacketInputStream
public class CfdpPacketInputStream extends Object implements PacketInputStream
CFDP packet reader that splits the stream into packets based on the length of the packet
-
-
Constructor Summary
Constructors Constructor Description CfdpPacketInputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidinit(InputStream inputStream, YConfiguration config)Called each time an input stream is opened to initialize the objectbyte[]readPacket()read the next packet - blocking if necessary until all the data is available.
-
-
-
Method Detail
-
init
public void init(InputStream inputStream, YConfiguration config)
Description copied from interface:PacketInputStreamCalled each time an input stream is opened to initialize the object- Specified by:
initin interfacePacketInputStream
-
readPacket
public byte[] readPacket() throws IOExceptionDescription copied from interface:PacketInputStreamread the next packet - blocking if necessary until all the data is available.- Specified by:
readPacketin 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
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-