|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.output.hdf5.UnitTest.FilePacketReader
public class FilePacketReader
Reads packets out of a known packet file, return an index to a buffer that holds them using an Iterator interface.
Field Summary | |
---|---|
private int |
bufLength
|
private static int |
bufSize
|
(package private) static byte[] |
dataBuf
|
private PacketFactoryI |
factory
|
private java.io.FileInputStream |
fis
|
private int |
index
|
private java.io.File |
inputFile
|
private int |
leftToProcess
|
Constructor Summary | |
---|---|
FilePacketReader(PacketFactoryI factory,
java.lang.String fileName)
Given file name, open the file |
Method Summary | |
---|---|
private int |
getAppID()
|
int |
getLeftOver()
|
private int |
getPacketLength()
|
private int |
getPacketSize()
|
boolean |
hasNext()
If there's space for a packet there's another... |
private void |
mayNeedToReadMore()
|
PacketI |
next()
Return a Packet constructed from an index into the buffer |
private void |
readInMore()
|
void |
remove()
Remove current packet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.io.File inputFile
private java.io.FileInputStream fis
private int index
private static final int bufSize
static byte[] dataBuf
private int bufLength
private PacketFactoryI factory
private int leftToProcess
Constructor Detail |
---|
public FilePacketReader(PacketFactoryI factory, java.lang.String fileName) throws RtStpsException
fileName
-
java.io.IOException
RtStpsException
Method Detail |
---|
public PacketI next()
next
in interface PacketReaderI
next
in interface java.util.Iterator<PacketI>
public boolean hasNext()
hasNext
in interface PacketReaderI
hasNext
in interface java.util.Iterator<PacketI>
public void remove()
PacketReaderI
remove
in interface PacketReaderI
remove
in interface java.util.Iterator<PacketI>
public int getLeftOver()
private int getAppID()
private int getPacketLength()
private int getPacketSize()
private void mayNeedToReadMore() throws java.io.IOException
java.io.IOException
private void readInMore() throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |