public class RWEBinaryDataSource extends BinaryDataSource
Constructor and Description |
---|
RWEBinaryDataSource(RWEDataBlock rweDataBlock) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getModuleHeaderData() |
int |
getModuleVersion()
Get a version number for the module.
|
PackedBinaryObject |
getPackedData(PamDataUnit pamDataUnit)
Get packed binary data for either sending to file or over the network
|
java.lang.String |
getStreamName() |
int |
getStreamVersion() |
void |
newFileOpened(java.io.File outputFile)
Called from the BinaryOutputStream whenever a new output
file is opened.
|
PamDataUnit |
sinkData(BinaryObjectData binaryObjectData,
BinaryHeader bh,
int moduleVersion)
Convert data read back in in viewer mode into the correct
type of PamDataUnit.
|
ModuleFooter |
sinkModuleFooter(BinaryObjectData binaryObjectData,
BinaryHeader bh,
ModuleHeader moduleHeader)
Do something with module footer information
|
ModuleHeader |
sinkModuleHeader(BinaryObjectData binaryObjectData,
BinaryHeader bh)
Do something with module header information
|
getBinaryStorageStream, getModuleFooterData, getModuleName, getModuleType, getSisterDataBlock, getSpecialDrawing, isDoBinaryStore, isStoreData, reset, saveData, setBinaryStorageStream, setDoBinaryStore, setStoreData, storeData
public RWEBinaryDataSource(RWEDataBlock rweDataBlock)
public byte[] getModuleHeaderData()
getModuleHeaderData
in class BinaryDataSource
public int getModuleVersion()
BinaryDataSource
This is different to the version number in the main file header and allows individual modules to update their format and maintain backwards compatibility with old data
getModuleVersion
in class BinaryDataSource
public java.lang.String getStreamName()
getStreamName
in class BinaryDataSource
public int getStreamVersion()
getStreamVersion
in class BinaryDataSource
public void newFileOpened(java.io.File outputFile)
BinaryDataSource
newFileOpened
in class BinaryDataSource
outputFile
- file information.public PackedBinaryObject getPackedData(PamDataUnit pamDataUnit)
BinaryDataSource
getPackedData
in class BinaryDataSource
pamDataUnit
- data unit to packpublic PamDataUnit sinkData(BinaryObjectData binaryObjectData, BinaryHeader bh, int moduleVersion)
BinaryDataSource
DO NOT add this unit directly to the datablock, but pass it back to the calling process which will add it to the datablock if necessary.
sinkData
in class BinaryDataSource
binaryObjectData
- Binary data read back from a file.bh
- binary header from start of file.public ModuleFooter sinkModuleFooter(BinaryObjectData binaryObjectData, BinaryHeader bh, ModuleHeader moduleHeader)
BinaryDataSource
sinkModuleFooter
in class BinaryDataSource
binaryObjectData
- data for the module header.bh
- Binary header informationpublic ModuleHeader sinkModuleHeader(BinaryObjectData binaryObjectData, BinaryHeader bh)
BinaryDataSource
sinkModuleHeader
in class BinaryDataSource
binaryObjectData
- data for the module header.bh
- Binary header information