CosName.java
1.91 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.io.stream.OutputByteStream
*/
package com.adobe.internal.pdftoolkit.core.cos;
import com.adobe.internal.io.stream.OutputByteStream;
import com.adobe.internal.pdftoolkit.core.cos.CosDocument;
import com.adobe.internal.pdftoolkit.core.cos.CosObject;
import com.adobe.internal.pdftoolkit.core.cos.CosObjectInfo;
import com.adobe.internal.pdftoolkit.core.cos.CosScalar;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFCosParseException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFIOException;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFSecurityException;
import com.adobe.internal.pdftoolkit.core.types.ASName;
import com.adobe.internal.pdftoolkit.core.util.StringOps;
import java.io.IOException;
public class CosName
extends CosScalar {
private ASName name;
CosName(CosDocument doc, ASName value, CosObjectInfo info) {
super(doc, info);
this.name = value;
}
public int getType() {
return 3;
}
public ASName nameValue() {
return this.name;
}
public String toString() {
return this.name.toString();
}
void writeOut(OutputByteStream outStream, boolean inString, boolean inDebugMode) throws PDFCosParseException, IOException, PDFSecurityException, PDFIOException {
if (inString && inDebugMode) {
outStream.write(StringOps.toByteArray(this.name.asString(inDebugMode)));
} else {
this.name.write(outStream);
}
}
public Object getValue() {
return this.name.asString(true);
}
public boolean equals(CosObject value) {
if (!(value instanceof CosName) || value.getDocument() != this.getDocument()) {
return false;
}
if (value == this) {
return true;
}
return value.nameValue() == this.nameValue();
}
}