ResLicense.java
8.06 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/*
* Decompiled with CFR 0_118.
*/
package com.scene7.is.ipp.messages;
import com.scene7.is.ipp.messages.InMessage;
import com.scene7.is.ipp.messages.Ipp;
import com.scene7.is.ipp.messages.IppBool;
import com.scene7.is.ipp.messages.IppInt;
import com.scene7.is.ipp.messages.Offset;
import java.io.IOException;
import java.io.Writer;
public class ResLicense
extends InMessage {
static int MessageNumber = 2097921;
private boolean isValid_;
private int encodingVersionMajor_;
private int encodingVersionMinor_;
private int sequenceNumber_;
private int numImages_;
private int numMegabytes_;
private int numProcessors_;
private int expirationMonth_;
private boolean enableManager_;
private boolean enableEditor_;
private boolean enableReviewer_;
private boolean enableCMS_;
private int expirationDay_;
public ResLicense(int tag, boolean isValid, int encodingVersionMajor, int encodingVersionMinor, int sequenceNumber, int numImages, int numMegabytes, int numProcessors, int expirationMonth, boolean enableManager, boolean enableEditor, boolean enableReviewer, boolean enableCMS, int expirationDay, int headClientId) {
int fixedLength;
this.tag_ = tag;
this.headerClientId_ = headClientId;
this.isValid_ = isValid;
this.encodingVersionMajor_ = encodingVersionMajor;
this.encodingVersionMinor_ = encodingVersionMinor;
this.sequenceNumber_ = sequenceNumber;
this.numImages_ = numImages;
this.numMegabytes_ = numMegabytes;
this.numProcessors_ = numProcessors;
this.expirationMonth_ = expirationMonth;
this.enableManager_ = enableManager;
this.enableEditor_ = enableEditor;
this.enableReviewer_ = enableReviewer;
this.enableCMS_ = enableCMS;
this.expirationDay_ = expirationDay;
this.messageLength_ = fixedLength = 52;
Offset pos = new Offset(0);
this.headBuffer_ = new byte[32];
this.bodyBuffer_ = new byte[this.messageLength_];
Ipp.StuffHeader(this.headBuffer_, this.headerClientId_, tag, MessageNumber, this.messageLength_);
IppBool.Stuff(this.bodyBuffer_, pos, null, this.isValid_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.encodingVersionMajor_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.encodingVersionMinor_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.sequenceNumber_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.numImages_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.numMegabytes_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.numProcessors_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.expirationMonth_);
IppBool.Stuff(this.bodyBuffer_, pos, null, this.enableManager_);
IppBool.Stuff(this.bodyBuffer_, pos, null, this.enableEditor_);
IppBool.Stuff(this.bodyBuffer_, pos, null, this.enableReviewer_);
IppBool.Stuff(this.bodyBuffer_, pos, null, this.enableCMS_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.expirationDay_);
Ipp.Assert(pos.val == fixedLength, "IppWatermarkType length");
}
public ResLicense() {
}
public void process(int headClientId, int tg, byte[] bf) {
this.headerClientId_ = headClientId;
this.tag_ = tg;
this.messageLength_ = bf.length;
this.headBuffer_ = new byte[32];
Ipp.StuffHeader(this.headBuffer_, this.headerClientId_, this.tag_, MessageNumber, this.messageLength_);
this.bodyBuffer_ = bf;
Offset pos = new Offset(0);
this.isValid_ = IppBool.Unstuff(this.bodyBuffer_, pos);
this.encodingVersionMajor_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.encodingVersionMinor_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.sequenceNumber_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.numImages_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.numMegabytes_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.numProcessors_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.expirationMonth_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.enableManager_ = IppBool.Unstuff(this.bodyBuffer_, pos);
this.enableEditor_ = IppBool.Unstuff(this.bodyBuffer_, pos);
this.enableReviewer_ = IppBool.Unstuff(this.bodyBuffer_, pos);
this.enableCMS_ = IppBool.Unstuff(this.bodyBuffer_, pos);
this.expirationDay_ = IppInt.Unstuff(this.bodyBuffer_, pos);
}
public int classification() {
return 1;
}
public int id() {
return MessageNumber;
}
public void print(Writer tf, String heading) throws IOException {
tf.write("\n");
tf.write(heading);
tf.write(": ResLicense ");
Ipp.PrintHex(tf, MessageNumber);
tf.write("\n");
tf.write("headClientId: " + this.headerClientId() + "\n");
Ipp.PrintTag(tf, "tag: ", this.tag());
tf.write("length: " + this.length());
tf.write("\n");
IppBool.Print(tf, "isValid: ", this.isValid_);
IppInt.Print(tf, "encodingVersionMajor: ", this.encodingVersionMajor_);
IppInt.Print(tf, "encodingVersionMinor: ", this.encodingVersionMinor_);
IppInt.Print(tf, "sequenceNumber: ", this.sequenceNumber_);
IppInt.Print(tf, "numImages: ", this.numImages_);
IppInt.Print(tf, "numMegabytes: ", this.numMegabytes_);
IppInt.Print(tf, "numProcessors: ", this.numProcessors_);
IppInt.Print(tf, "expirationMonth: ", this.expirationMonth_);
IppBool.Print(tf, "enableManager: ", this.enableManager_);
IppBool.Print(tf, "enableEditor: ", this.enableEditor_);
IppBool.Print(tf, "enableReviewer: ", this.enableReviewer_);
IppBool.Print(tf, "enableCMS: ", this.enableCMS_);
IppInt.Print(tf, "expirationDay: ", this.expirationDay_);
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("ResLicense ");
buffer.append("[isValid: " + String.valueOf(this.isValid_) + "],");
buffer.append("[encodingVersionMajor: " + String.valueOf(this.encodingVersionMajor_) + "],");
buffer.append("[encodingVersionMinor: " + String.valueOf(this.encodingVersionMinor_) + "],");
buffer.append("[sequenceNumber: " + String.valueOf(this.sequenceNumber_) + "],");
buffer.append("[numImages: " + String.valueOf(this.numImages_) + "],");
buffer.append("[numMegabytes: " + String.valueOf(this.numMegabytes_) + "],");
buffer.append("[numProcessors: " + String.valueOf(this.numProcessors_) + "],");
buffer.append("[expirationMonth: " + String.valueOf(this.expirationMonth_) + "],");
buffer.append("[enableManager: " + String.valueOf(this.enableManager_) + "],");
buffer.append("[enableEditor: " + String.valueOf(this.enableEditor_) + "],");
buffer.append("[enableReviewer: " + String.valueOf(this.enableReviewer_) + "],");
buffer.append("[enableCMS: " + String.valueOf(this.enableCMS_) + "],");
buffer.append("[expirationDay: " + String.valueOf(this.expirationDay_) + "],");
return buffer.toString();
}
public boolean isValid() {
return this.isValid_;
}
public int encodingVersionMajor() {
return this.encodingVersionMajor_;
}
public int encodingVersionMinor() {
return this.encodingVersionMinor_;
}
public int sequenceNumber() {
return this.sequenceNumber_;
}
public int numImages() {
return this.numImages_;
}
public int numMegabytes() {
return this.numMegabytes_;
}
public int numProcessors() {
return this.numProcessors_;
}
public int expirationMonth() {
return this.expirationMonth_;
}
public boolean enableManager() {
return this.enableManager_;
}
public boolean enableEditor() {
return this.enableEditor_;
}
public boolean enableReviewer() {
return this.enableReviewer_;
}
public boolean enableCMS() {
return this.enableCMS_;
}
public int expirationDay() {
return this.expirationDay_;
}
}