IppAnnotInfo.java
5.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*
* Decompiled with CFR 0_118.
*/
package com.scene7.is.ipp.messages;
import com.scene7.is.ipp.messages.Ipp;
import com.scene7.is.ipp.messages.IppDate;
import com.scene7.is.ipp.messages.IppInt;
import com.scene7.is.ipp.messages.IppInt64;
import com.scene7.is.ipp.messages.Offset;
import java.io.IOException;
import java.io.Writer;
public class IppAnnotInfo {
private int id_;
private int groupId_;
private long created_;
public IppAnnotInfo(int id, int groupId, long created) {
this.id_ = id;
this.groupId_ = groupId;
this.created_ = created;
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[");
buffer.append("id: ").append(String.valueOf(this.id_)).append(" ");
buffer.append("groupId: ").append(String.valueOf(this.groupId_)).append(" ");
buffer.append("created: ").append(String.valueOf(this.created_)).append(" ");
buffer.append("]");
return buffer.toString();
}
public boolean equals(Object o) {
if (!(o instanceof IppAnnotInfo)) {
return false;
}
IppAnnotInfo e = (IppAnnotInfo)o;
if (this.id_ != e.id_) {
return false;
}
if (this.groupId_ != e.groupId_) {
return false;
}
if (this.created_ != e.created_) {
return false;
}
return true;
}
public static IppAnnotInfo Unstuff(byte[] arr, Offset arrayPos) {
Ipp.Assert((arrayPos.val & 7) == 0, "IppAnnotInfo align");
int id = IppInt.Unstuff(arr, arrayPos);
int groupId = IppInt.Unstuff(arr, arrayPos);
long created = IppInt64.Unstuff(arr, arrayPos);
return new IppAnnotInfo(id, groupId, created);
}
public static IppAnnotInfo[] UnstuffArray(byte[] arr, Offset arrayPos) {
Ipp.Assert((arrayPos.val & 3) == 0, "IppAnnotInfo alignemt");
int count = IppInt.Unstuff(arr, arrayPos);
int size = IppInt.Unstuff(arr, arrayPos);
Ipp.Assert(count == 0 || size >= 16, "IppAnnotInfo count");
Offset roff = new Offset(IppInt.Unstuff(arr, arrayPos));
Offset loff = new Offset(roff.val);
IppAnnotInfo[] result = new IppAnnotInfo[count];
for (int i = 0; i < count; ++i) {
loff.val = roff.val;
result[i] = IppAnnotInfo.Unstuff(arr, loff);
roff.val += size;
}
return result;
}
public static IppAnnotInfo[] UnstuffFixedArray(byte[] arr, Offset arrayPos, int count) {
IppAnnotInfo[] result = new IppAnnotInfo[count];
for (int i = 0; i < count; ++i) {
result[i] = IppAnnotInfo.Unstuff(arr, arrayPos);
}
return result;
}
public static void Stuff(byte[] arr, Offset arrayPos, Offset varPos, IppAnnotInfo val) {
Ipp.Assert((arrayPos.val & 7) == 0, "IppAnnotInfo align");
if (val != null) {
IppInt.Stuff(arr, arrayPos, varPos, val.id());
IppInt.Stuff(arr, arrayPos, varPos, val.groupId());
IppInt64.Stuff(arr, arrayPos, varPos, val.created());
} else {
Ipp.StuffNullBytes(arr, arrayPos, 16);
}
}
public static void StuffArray(byte[] arr, Offset arrayPos, Offset varPos, IppAnnotInfo[] val) {
Ipp.Assert((arrayPos.val & 3) == 0, "IppAnnotInfo stuffarray align");
int len = val != null ? val.length : 0;
IppInt.Stuff(arr, arrayPos, varPos, len);
IppInt.Stuff(arr, arrayPos, varPos, 16);
Ipp.StuffOffset(arr, arrayPos, varPos, len > 0 ? 8 : 1);
Offset varvarPos = new Offset(varPos.val + 16 * len);
for (int i = 0; i < len; ++i) {
IppAnnotInfo.Stuff(arr, varPos, varvarPos, val[i]);
}
varPos.val = varvarPos.val;
}
public static void StuffFixedArray(byte[] arr, Offset arrayPos, Offset varPos, int count, IppAnnotInfo[] val) {
Ipp.Assert(val.length == count, "IppAnnotInfo count");
for (int i = 0; i < count; ++i) {
IppAnnotInfo.Stuff(arr, arrayPos, varPos, val[i]);
}
}
public static void Print(Writer tf, String label, IppAnnotInfo it) throws IOException {
String ll = label + "IppAnnotInfo: ";
if (it == null) {
tf.write(ll + "NULL!!\n");
return;
}
tf.write(ll + "\n");
IppInt.Print(tf, ll + "id: ", it.id());
IppInt.Print(tf, ll + "groupId: ", it.groupId());
IppDate.Print(tf, ll + "created: ", it.created());
}
public static void PrintArray(Writer tf, String label, IppAnnotInfo[] it) throws IOException {
String ll = label + "IppAnnotInfo Array, length: ";
tf.write(ll);
if (it == null) {
tf.write("NULL!!!\n");
return;
}
tf.write("" + it.length + "\n");
for (int i = 0; i < it.length; ++i) {
ll = label + "IppAnnotInfo[" + String.valueOf(i) + "]: ";
IppAnnotInfo.Print(tf, ll, it[i]);
}
}
public int id() {
return this.id_;
}
public int groupId() {
return this.groupId_;
}
public long created() {
return this.created_;
}
}