internal void ReadDataTagDataEntry(byte[] data, IccDataTagDataEntry expected, uint size) { IccDataReader reader = CreateReader(data); IccDataTagDataEntry output = reader.ReadDataTagDataEntry(size); Assert.Equal(expected, output); }
internal void WriteDataTagDataEntry(byte[] expected, IccDataTagDataEntry data, uint size) { IccDataWriter writer = CreateWriter(); writer.WriteDataTagDataEntry(data); byte[] output = writer.GetData(); Assert.Equal(expected, output); }
/// <summary> /// Writes a <see cref="IccDataTagDataEntry"/> /// </summary> /// <param name="value">The entry to write</param> /// <returns>The number of bytes written</returns> public int WriteDataTagDataEntry(IccDataTagDataEntry value) { return(this.WriteEmpty(3) + this.WriteByte((byte)(value.IsAscii ? 0x01 : 0x00)) + this.WriteArray(value.Data)); }