Npgsql.NpgsqlState.ReadCopyHeader C# (CSharp) Method

ReadCopyHeader() private static method

private static ReadCopyHeader ( Stream stream ) : Npgsql.NpgsqlCopyFormat
stream Stream
return Npgsql.NpgsqlCopyFormat
        private static NpgsqlCopyFormat ReadCopyHeader(Stream stream)
        {
            byte copyFormat = (byte) stream.ReadByte();
            Int16 numCopyFields = PGUtil.ReadInt16(stream);
            Int16[] copyFieldFormats = new Int16[numCopyFields];
            for (Int16 i = 0; i < numCopyFields; i++)
            {
                copyFieldFormats[i] = PGUtil.ReadInt16(stream);
            }
            return new NpgsqlCopyFormat(copyFormat, copyFieldFormats);
        }
    }