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);
}
}