Property | Type | Description | |
---|---|---|---|
DEF_BUF_LEN | int |
Method | Description | |
---|---|---|
FileCodestreamWriter ( System os, int mb ) : System |
Uses the output stream 'os' for writing the bit stream, using the 'he' header encoder. The magic number is written to the bit stream. Normally, the header encoder must be empty (i.e. no data has been written to it yet). No BufferedOutputStream is used on top of the output stream 'os'.
|
|
close ( ) : void |
Writes the EOC marker.
|
|
commitBitstreamHeader ( |
Writes the header data in the codestream and actualize ndata with the header length. The header is either a MainHeaderEncoder or a TileHeaderEncoder.
|
|
writePacketBody ( byte body, int blen, bool sim, bool roiInPkt, int roiLen ) : int |
Writes a packet body to the bit stream and returns the number of bytes used by this body .If in simulation mode then no data is written to the bit stream but the number of bytes is calculated. This can be used for iterative rate allocation. If the length of the data that is to be written to the bit stream is more than the space left (as returned by getMaxAvailableBytes()) only the data that does not exceed the allowed length is written, the rest is discarded. However the value returned by the method is the total length of the packet body , as if all of it was written to the bit stream.
|
|
writePacketHead ( byte head, int hlen, bool sim, bool sop, bool eph ) : int |
Writes a packet head to the bit stream and returns the number of bytes used by this header. It returns the total number of bytes that the packet head takes in the bit stream. If in simulation mode then no data is written to the bit stream but the number of bytes is calculated. This can be used for iterative rate allocation. If the length of the data that is to be written to the bit stream is more than the space left (as returned by getMaxAvailableBytes()) only the data that does not exceed the allowed length is written, the rest is discarded. However the value returned by the method is the total length of the packet, as if all of it was written to the bit stream. If the bit stream header has not been commited yet and 'sim' is false, then the bit stream header is automatically commited (see commitBitstreamHeader() method) before writting the packet.
|
Method | Description | |
---|---|---|
initSOP_EPHArrays ( ) : void |
Performs the initialisation of the arrays that are used to store the values used to write SOP and EPH markers
|
public FileCodestreamWriter ( System os, int mb ) : System | ||
os | System | The output stream where to write the bit stream. /// /// |
mb | int | The maximum number of bytes that can be written to the bit /// stream. /// /// |
return | System |
public commitBitstreamHeader ( |
||
he | The current header encoder. /// /// | |
return | void |
public writePacketBody ( byte body, int blen, bool sim, bool roiInPkt, int roiLen ) : int | ||
body | byte | The packet body data. /// /// |
blen | int | The number of bytes in the packet body. /// /// |
sim | bool | Simulation mode flag. If true nothing is written to the bit /// stream, but the number of bytes that would be written is returned. /// /// |
roiInPkt | bool | Whether or not this packet contains ROI information /// /// |
roiLen | int | Number of byte to read in packet body to get all the ROI /// information /// /// |
return | int |
public writePacketHead ( byte head, int hlen, bool sim, bool sop, bool eph ) : int | ||
head | byte | The packet head data. /// /// |
hlen | int | The number of bytes in the packet head. /// /// |
sim | bool | Simulation mode flag. If true nothing is written to the bit /// stream, but the number of bytes that would be written is returned. /// /// |
sop | bool | Start of packet header marker flag. This flag indicates /// whether or not SOP markers should be written. If true, SOP markers /// should be written, if false, they should not. /// /// |
eph | bool | End of Packet Header marker flag. This flag indicates /// whether or not EPH markers should be written. If true, EPH markers /// should be written, if false, they should not. /// /// |
return | int |