ResImageViewCreate.java
9.25 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
/*
* 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.IppByteArray;
import com.scene7.is.ipp.messages.IppColorModelType;
import com.scene7.is.ipp.messages.IppDate;
import com.scene7.is.ipp.messages.IppDouble;
import com.scene7.is.ipp.messages.IppInt;
import com.scene7.is.ipp.messages.IppInt64;
import com.scene7.is.ipp.messages.IppString;
import com.scene7.is.ipp.messages.Offset;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
public class ResImageViewCreate
extends InMessage {
static int MessageNumber = 131855;
private int viewId_;
private int stateId_;
private int imageXDim_;
private int imageYDim_;
private int tileXDim_;
private int tileYDim_;
private byte[] encodingData_;
private long created_;
private long modified_;
private String physicalPath_;
private byte[] imageKey_;
private int colorModel_;
private double xDpi_;
private double yDpi_;
private int textXOffset_;
private int textYOffset_;
public ResImageViewCreate(int tag, int viewId, int stateId, int imageXDim, int imageYDim, int tileXDim, int tileYDim, byte[] encodingData, long created, long modified, String physicalPath, byte[] imageKey, int colorModel, double xDpi, double yDpi, int textXOffset, int textYOffset, int headClientId) {
this.tag_ = tag;
this.headerClientId_ = headClientId;
this.viewId_ = viewId;
this.stateId_ = stateId;
this.imageXDim_ = imageXDim;
this.imageYDim_ = imageYDim;
this.tileXDim_ = tileXDim;
this.tileYDim_ = tileYDim;
this.encodingData_ = encodingData;
this.created_ = created;
this.modified_ = modified;
this.physicalPath_ = physicalPath;
this.imageKey_ = imageKey;
this.colorModel_ = colorModel;
this.xDpi_ = xDpi;
this.yDpi_ = yDpi;
this.textXOffset_ = textXOffset;
this.textYOffset_ = textYOffset;
int fixedLength = 88;
Offset varPos = new Offset(fixedLength);
varPos.val += encodingData.length;
try {
varPos.val += physicalPath.getBytes("UTF-8").length + 1;
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
varPos.val += imageKey.length;
this.messageLength_ = varPos.val;
varPos.val = fixedLength;
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_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.viewId_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.stateId_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.imageXDim_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.imageYDim_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.tileXDim_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.tileYDim_);
IppByteArray.Stuff(this.bodyBuffer_, pos, varPos, this.encodingData_);
IppInt64.Stuff(this.bodyBuffer_, pos, null, this.created_);
IppInt64.Stuff(this.bodyBuffer_, pos, null, this.modified_);
IppString.Stuff(this.bodyBuffer_, pos, varPos, this.physicalPath_);
IppByteArray.Stuff(this.bodyBuffer_, pos, varPos, this.imageKey_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.colorModel_);
IppDouble.Stuff(this.bodyBuffer_, pos, null, this.xDpi_);
IppDouble.Stuff(this.bodyBuffer_, pos, null, this.yDpi_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.textXOffset_);
IppInt.Stuff(this.bodyBuffer_, pos, null, this.textYOffset_);
Ipp.Assert(pos.val == fixedLength, "IppWatermarkType length");
}
public ResImageViewCreate() {
}
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.viewId_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.stateId_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.imageXDim_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.imageYDim_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.tileXDim_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.tileYDim_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.encodingData_ = IppByteArray.Unstuff(this.bodyBuffer_, pos);
this.created_ = IppInt64.Unstuff(this.bodyBuffer_, pos);
this.modified_ = IppInt64.Unstuff(this.bodyBuffer_, pos);
this.physicalPath_ = IppString.Unstuff(this.bodyBuffer_, pos);
this.imageKey_ = IppByteArray.Unstuff(this.bodyBuffer_, pos);
this.colorModel_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.xDpi_ = IppDouble.Unstuff(this.bodyBuffer_, pos);
this.yDpi_ = IppDouble.Unstuff(this.bodyBuffer_, pos);
this.textXOffset_ = IppInt.Unstuff(this.bodyBuffer_, pos);
this.textYOffset_ = 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(": ResImageViewCreate ");
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");
IppInt.Print(tf, "viewId: ", this.viewId_);
IppInt.Print(tf, "stateId: ", this.stateId_);
IppInt.Print(tf, "imageXDim: ", this.imageXDim_);
IppInt.Print(tf, "imageYDim: ", this.imageYDim_);
IppInt.Print(tf, "tileXDim: ", this.tileXDim_);
IppInt.Print(tf, "tileYDim: ", this.tileYDim_);
IppByteArray.Print(tf, "encodingData: ", this.encodingData_);
IppDate.Print(tf, "created: ", this.created_);
IppDate.Print(tf, "modified: ", this.modified_);
IppString.Print(tf, "physicalPath: ", this.physicalPath_);
IppByteArray.Print(tf, "imageKey: ", this.imageKey_);
IppColorModelType.Print(tf, "colorModel: ", this.colorModel_);
IppDouble.Print(tf, "xDpi: ", this.xDpi_);
IppDouble.Print(tf, "yDpi: ", this.yDpi_);
IppInt.Print(tf, "textXOffset: ", this.textXOffset_);
IppInt.Print(tf, "textYOffset: ", this.textYOffset_);
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("ResImageViewCreate ");
buffer.append("[viewId: " + String.valueOf(this.viewId_) + "],");
buffer.append("[stateId: " + String.valueOf(this.stateId_) + "],");
buffer.append("[imageXDim: " + String.valueOf(this.imageXDim_) + "],");
buffer.append("[imageYDim: " + String.valueOf(this.imageYDim_) + "],");
buffer.append("[tileXDim: " + String.valueOf(this.tileXDim_) + "],");
buffer.append("[tileYDim: " + String.valueOf(this.tileYDim_) + "],");
buffer.append("[encodingData: " + String.valueOf(this.encodingData_) + "],");
buffer.append("[created: " + String.valueOf(this.created_) + "],");
buffer.append("[modified: " + String.valueOf(this.modified_) + "],");
buffer.append("[physicalPath: " + String.valueOf(this.physicalPath_) + "],");
buffer.append("[imageKey: " + String.valueOf(this.imageKey_) + "],");
buffer.append("[colorModel: " + String.valueOf(this.colorModel_) + "],");
buffer.append("[xDpi: " + String.valueOf(this.xDpi_) + "],");
buffer.append("[yDpi: " + String.valueOf(this.yDpi_) + "],");
buffer.append("[textXOffset: " + String.valueOf(this.textXOffset_) + "],");
buffer.append("[textYOffset: " + String.valueOf(this.textYOffset_) + "],");
return buffer.toString();
}
public int viewId() {
return this.viewId_;
}
public int stateId() {
return this.stateId_;
}
public int imageXDim() {
return this.imageXDim_;
}
public int imageYDim() {
return this.imageYDim_;
}
public int tileXDim() {
return this.tileXDim_;
}
public int tileYDim() {
return this.tileYDim_;
}
public byte[] encodingData() {
return this.encodingData_;
}
public long created() {
return this.created_;
}
public long modified() {
return this.modified_;
}
public String physicalPath() {
return this.physicalPath_;
}
public byte[] imageKey() {
return this.imageKey_;
}
public int colorModel() {
return this.colorModel_;
}
public double xDpi() {
return this.xDpi_;
}
public double yDpi() {
return this.yDpi_;
}
public int textXOffset() {
return this.textXOffset_;
}
public int textYOffset() {
return this.textYOffset_;
}
}