/// <summary> Writes the header data in the codestream and actualize ndata with the
/// header length. The header is either a MainHeaderEncoder or a
/// TileHeaderEncoder.
///
/// </summary>
/// <param name="he">The current header encoder.
///
/// </param>
/// <exception cref="IOException">If an I/O error occurs while writing the data.
///
/// </exception>
public override void commitBitstreamHeader(HeaderEncoder he)
{
// Actualize ndata
ndata += he.Length;
he.writeTo(out_Renamed); // Write the header
// Reset packet index used for SOP markers
packetIdx = 0;
// Deal with ROI information
lenLastNoROI += he.Length;
}