Mercurial > repos > RelicTools > RelicTools
comparison ChunkyDataDATA.cs @ 0:82db9430c2e4 default tip
Initial commit under GPLv3
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 06 Oct 2018 19:49:25 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:82db9430c2e4 |
---|---|
1 // This file is a part of the Relic Tools and is copyright 2006-2018 IBBoard. | |
2 // | |
3 // The file and the library/program it is in are licensed under the GNU GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. | |
4 using System; | |
5 using System.IO; | |
6 using IBBoard.Relic.RelicTools.Exceptions; | |
7 | |
8 namespace IBBoard.Relic.RelicTools | |
9 { | |
10 /// <summary> | |
11 /// Summary description for ChunkyDataDATA. | |
12 /// </summary> | |
13 public class ChunkyDataDATA : ChunkyData | |
14 { | |
15 private ChunkyDataATTR attr; | |
16 private byte[] data; | |
17 | |
18 public ChunkyDataDATA(int version_in, string name_in, byte[] innerData_in):base("DATA", version_in, name_in) | |
19 { | |
20 data = innerData_in; | |
21 } | |
22 | |
23 public ChunkyDataATTR Attributes{ | |
24 get{ return attr; } | |
25 set{ attr = value; } | |
26 } | |
27 | |
28 public override int DataLength | |
29 { | |
30 get | |
31 { | |
32 return data.Length; | |
33 } | |
34 } | |
35 | |
36 public override byte[] GetDataBytes() | |
37 { | |
38 return data; | |
39 } | |
40 | |
41 public override string GetDisplayDetails() | |
42 { | |
43 return base.GetBaseDisplayDetails()+Environment.NewLine+ | |
44 "------------"+Environment.NewLine+ | |
45 ByteArrayToString(GetDataBytes()); | |
46 } | |
47 } | |
48 } |