CSJ2K.j2k.fileformat.writer.FileFormatWriter.writeContiguousCodeStreamBox C# (CSharp) Method

writeContiguousCodeStreamBox() public method

This method writes the Contiguous codestream box
If an I/O error ocurred. /// ///
public writeContiguousCodeStreamBox ( byte cs ) : void
cs byte The contiguous codestream /// ///
return void
        public virtual void writeContiguousCodeStreamBox(byte[] cs)
        {
            // Write box length (LBox)
            // This value is set to 0 since in this implementation, this box is
            // always last
            fi.writeInt(clength + 8);

            // Write contiguous codestream box name (TBox)
            fi.writeInt(CSJ2K.j2k.fileformat.FileFormatBoxes.CONTIGUOUS_CODESTREAM_BOX);

            // Write codestream
            for (int i = 0; i < clength; i++)
                fi.writeByte(cs[i]);
        }