CSJ2K.j2k.codestream.HeaderInfo.getCopy C# (CSharp) Method

getCopy() public method

Returns a copy of this object
public getCopy ( int nt ) : HeaderInfo
nt int
return HeaderInfo
        public virtual HeaderInfo getCopy(int nt)
        {
            HeaderInfo nhi = null;
            // SIZ
            try
            {
                nhi = (HeaderInfo) Clone();
            }
            //UPGRADE_NOTE: Exception 'java.lang.CloneNotSupportedException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
            catch (System.Exception e)
            {
                throw new System.InvalidOperationException("Cannot clone HeaderInfo instance");
            }
            nhi.sizValue = sizValue.Copy;
            // COD
            if (codValue["main"] != null)
            {
                COD ms = (COD) codValue["main"];
                nhi.codValue["main"] = ms.Copy;
            }
            for (int t = 0; t < nt; t++)
            {
                if (codValue["t" + t] != null)
                {
                    COD ms = (COD) codValue["t" + t];
                    nhi.codValue["t" + t] = ms.Copy;
                }
            }
            return nhi;
        }