IppImageAnchorFxg.java
5.36 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
/*
* Decompiled with CFR 0_118.
*/
package com.scene7.is.ipp.messages;
import com.scene7.is.ipp.messages.Ipp;
import com.scene7.is.ipp.messages.IppByte;
import com.scene7.is.ipp.messages.IppImageAnchor;
import com.scene7.is.ipp.messages.IppImageAnchorType;
import com.scene7.is.ipp.messages.IppInt;
import com.scene7.is.ipp.messages.IppLongString;
import com.scene7.is.ipp.messages.IppPixelType;
import com.scene7.is.ipp.messages.Offset;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
public class IppImageAnchorFxg
extends IppImageAnchor {
private int width_;
private int height_;
private int pixelType_;
private String id_;
private String url_;
public IppImageAnchorFxg(int width, int height, int pixelType, String id, String url) {
this.width_ = width;
this.height_ = height;
this.pixelType_ = pixelType;
this.id_ = id;
this.url_ = url;
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[");
buffer.append("width: ").append(String.valueOf(this.width_)).append(" ");
buffer.append("height: ").append(String.valueOf(this.height_)).append(" ");
buffer.append("pixelType: ").append(String.valueOf(this.pixelType_)).append(" ");
buffer.append("id: ").append(String.valueOf(this.id_)).append(" ");
buffer.append("url: ").append(String.valueOf(this.url_)).append(" ");
buffer.append("]");
return buffer.toString();
}
public boolean equals(Object o) {
if (!(o instanceof IppImageAnchorFxg)) {
return false;
}
IppImageAnchorFxg e = (IppImageAnchorFxg)o;
if (this.width_ != e.width_) {
return false;
}
if (this.height_ != e.height_) {
return false;
}
if (this.pixelType_ != e.pixelType_) {
return false;
}
if (!this.id_.equals(e.id_)) {
return false;
}
if (!this.url_.equals(e.url_)) {
return false;
}
return true;
}
public static IppImageAnchorFxg UnstuffDerived(byte[] arr, Offset arrayPos) {
Ipp.Assert((arrayPos.val & 3) == 0, "IppImageAnchorFxg align");
int type = IppInt.Unstuff(arr, arrayPos);
int width = IppInt.Unstuff(arr, arrayPos);
int height = IppInt.Unstuff(arr, arrayPos);
int pixelType = IppInt.Unstuff(arr, arrayPos);
String id = IppLongString.Unstuff(arr, arrayPos);
String url = IppLongString.Unstuff(arr, arrayPos);
IppByte.UnstuffFixedArray(arr, arrayPos, 24);
Ipp.Assert(type == 65544, "IppImageAnchorFxg enum id");
return new IppImageAnchorFxg(width, height, pixelType, id, url);
}
public static void StuffDerived(byte[] arr, Offset arrayPos, Offset varPos, IppImageAnchorFxg val) {
Ipp.Assert((arrayPos.val & 3) == 0, "IppImageAnchorFxg align");
if (val != null) {
IppInt.Stuff(arr, arrayPos, varPos, val.type());
IppInt.Stuff(arr, arrayPos, varPos, val.width());
IppInt.Stuff(arr, arrayPos, varPos, val.height());
IppInt.Stuff(arr, arrayPos, varPos, val.pixelType());
IppLongString.Stuff(arr, arrayPos, varPos, val.id());
IppLongString.Stuff(arr, arrayPos, varPos, val.url());
Ipp.StuffNullBytes(arr, arrayPos, 24);
} else {
Ipp.StuffNullBytes(arr, arrayPos, 48);
}
}
public static void Print(Writer tf, String label, IppImageAnchorFxg it) throws IOException {
String ll = label + "IppImageAnchorFxg: ";
if (it == null) {
tf.write(ll + "NULL!!\n");
return;
}
tf.write(ll + "\n");
IppImageAnchorType.Print(tf, ll + "type: ", it.type());
IppInt.Print(tf, ll + "width: ", it.width());
IppInt.Print(tf, ll + "height: ", it.height());
IppPixelType.Print(tf, ll + "pixelType: ", it.pixelType());
IppLongString.Print(tf, ll + "id: ", it.id());
IppLongString.Print(tf, ll + "url: ", it.url());
}
public static void PrintArray(Writer tf, String label, IppImageAnchorFxg[] it) throws IOException {
String ll = label + "IppImageAnchorFxg 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 + "IppImageAnchorFxg[" + String.valueOf(i) + "]: ";
IppImageAnchorFxg.Print(tf, ll, it[i]);
}
}
public void adjustVarPos(Offset varPos) {
try {
varPos.val += this.id_.getBytes("UTF-8").length + 1;
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
try {
varPos.val += this.url_.getBytes("UTF-8").length + 1;
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
}
public int type() {
return 65544;
}
public int width() {
return this.width_;
}
public int height() {
return this.height_;
}
public int pixelType() {
return this.pixelType_;
}
public String id() {
return this.id_;
}
public String url() {
return this.url_;
}
}