IppImageAnchorPhotoFont.java
4.09 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
/*
* 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.Offset;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
public class IppImageAnchorPhotoFont
extends IppImageAnchor {
private String xmlFile_;
private String text_;
public IppImageAnchorPhotoFont(String xmlFile, String text) {
this.xmlFile_ = xmlFile;
this.text_ = text;
}
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[");
buffer.append("xmlFile: ").append(String.valueOf(this.xmlFile_)).append(" ");
buffer.append("text: ").append(String.valueOf(this.text_)).append(" ");
buffer.append("]");
return buffer.toString();
}
public boolean equals(Object o) {
if (!(o instanceof IppImageAnchorPhotoFont)) {
return false;
}
IppImageAnchorPhotoFont e = (IppImageAnchorPhotoFont)o;
if (!this.xmlFile_.equals(e.xmlFile_)) {
return false;
}
if (!this.text_.equals(e.text_)) {
return false;
}
return true;
}
public static IppImageAnchorPhotoFont UnstuffDerived(byte[] arr, Offset arrayPos) {
Ipp.Assert((arrayPos.val & 3) == 0, "IppImageAnchorPhotoFont align");
int type = IppInt.Unstuff(arr, arrayPos);
String xmlFile = IppLongString.Unstuff(arr, arrayPos);
String text = IppLongString.Unstuff(arr, arrayPos);
IppByte.UnstuffFixedArray(arr, arrayPos, 36);
Ipp.Assert(type == 65546, "IppImageAnchorPhotoFont enum id");
return new IppImageAnchorPhotoFont(xmlFile, text);
}
public static void StuffDerived(byte[] arr, Offset arrayPos, Offset varPos, IppImageAnchorPhotoFont val) {
Ipp.Assert((arrayPos.val & 3) == 0, "IppImageAnchorPhotoFont align");
if (val != null) {
IppInt.Stuff(arr, arrayPos, varPos, val.type());
IppLongString.Stuff(arr, arrayPos, varPos, val.xmlFile());
IppLongString.Stuff(arr, arrayPos, varPos, val.text());
Ipp.StuffNullBytes(arr, arrayPos, 36);
} else {
Ipp.StuffNullBytes(arr, arrayPos, 48);
}
}
public static void Print(Writer tf, String label, IppImageAnchorPhotoFont it) throws IOException {
String ll = label + "IppImageAnchorPhotoFont: ";
if (it == null) {
tf.write(ll + "NULL!!\n");
return;
}
tf.write(ll + "\n");
IppImageAnchorType.Print(tf, ll + "type: ", it.type());
IppLongString.Print(tf, ll + "xmlFile: ", it.xmlFile());
IppLongString.Print(tf, ll + "text: ", it.text());
}
public static void PrintArray(Writer tf, String label, IppImageAnchorPhotoFont[] it) throws IOException {
String ll = label + "IppImageAnchorPhotoFont 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 + "IppImageAnchorPhotoFont[" + String.valueOf(i) + "]: ";
IppImageAnchorPhotoFont.Print(tf, ll, it[i]);
}
}
public void adjustVarPos(Offset varPos) {
try {
varPos.val += this.xmlFile_.getBytes("UTF-8").length + 1;
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
try {
varPos.val += this.text_.getBytes("UTF-8").length + 1;
}
catch (UnsupportedEncodingException e) {
throw new AssertionError(e);
}
}
public int type() {
return 65546;
}
public String xmlFile() {
return this.xmlFile_;
}
public String text() {
return this.text_;
}
}