|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.xstps.pds.OutputFiles
class OutputFiles
This class manages the output files. It deals with naming conventions and switching between data files, which it hides from its user.
Nested Class Summary | |
---|---|
(package private) class |
OutputFiles.Ap
This class holds a small amount of information about an application id. |
(package private) class |
OutputFiles.DSFile
This class holds information about one data file. |
Field Summary | |
---|---|
private long |
bytesPerFile
|
private long |
bytesWritten
|
private OutputFiles.DSFile |
currentFile
|
private java.util.ArrayList<OutputFiles.DSFile> |
fileList
|
private java.lang.StringBuffer |
fileNameTemplate
|
private java.io.OutputStream |
out
|
private java.lang.String |
path
|
private PacketKernel |
previousPacketKernel
|
private int[] |
xappid
|
private int[] |
xspid
|
Constructor Summary | |
---|---|
OutputFiles(java.lang.StringBuffer constructionRecordName,
java.lang.String path)
Create an OutputFiles object. |
Method Summary | |
---|---|
(package private) void |
close()
Close the current data file. |
(package private) int |
getFileCount()
Get the number of created data files. |
(package private) java.lang.String |
getPath()
Get the directory where this class is putting data files. |
private void |
openFile()
Open a file. |
(package private) void |
setAppidSpid(int apindex,
int appid,
int spid)
Set the application id and spacecraft id for a specific application index. |
(package private) void |
setBytesPerFile(long length)
Set the number of bytes per file. |
(package private) void |
write(Packet packet,
PacketKernel packetKernel,
int apindex)
Write a packet to a data file. |
(package private) void |
writeCS(java.io.DataOutput crecord)
Write file information to the construction record. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<OutputFiles.DSFile> fileList
private long bytesPerFile
private PacketKernel previousPacketKernel
private long bytesWritten
private OutputFiles.DSFile currentFile
private java.lang.StringBuffer fileNameTemplate
private java.lang.String path
private java.io.OutputStream out
private int[] xappid
private int[] xspid
Constructor Detail |
---|
OutputFiles(java.lang.StringBuffer constructionRecordName, java.lang.String path) throws java.io.IOException
constructionRecordName
- The construction record file namepath
- The directory where it will put the data files
java.io.IOException
Method Detail |
---|
final void setBytesPerFile(long length)
final java.lang.String getPath()
final void setAppidSpid(int apindex, int appid, int spid)
final int getFileCount()
private void openFile() throws java.io.FileNotFoundException
java.io.FileNotFoundException
void write(Packet packet, PacketKernel packetKernel, int apindex) throws java.io.IOException
java.io.IOException
void close() throws java.io.IOException
java.io.IOException
void writeCS(java.io.DataOutput crecord) throws java.io.IOException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |