PDFXFAPacket.java
1.6 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException
* com.adobe.internal.pdftoolkit.core.types.ASString
*/
package com.adobe.internal.pdftoolkit.pdf.interactive.forms;
import com.adobe.internal.pdftoolkit.core.exceptions.PDFInvalidParameterException;
import com.adobe.internal.pdftoolkit.core.types.ASString;
import com.adobe.internal.pdftoolkit.pdf.document.PDFStream;
public class PDFXFAPacket {
private final ASString packetName;
private final PDFStream dataStream;
PDFXFAPacket(ASString packetName, PDFStream dataStream) throws PDFInvalidParameterException {
if (packetName == null) {
throw new PDFInvalidParameterException("XFA Packet name can't be null");
}
if (dataStream == null) {
throw new PDFInvalidParameterException("XFA Data Stream can't be null");
}
this.packetName = packetName;
this.dataStream = dataStream;
}
public ASString getPacketName() {
return this.packetName;
}
public PDFStream getDataStream() {
return this.dataStream;
}
public boolean equals(Object obj) {
if (!(obj instanceof PDFXFAPacket)) {
return false;
}
PDFXFAPacket otherPacket = (PDFXFAPacket)obj;
if (this.packetName.equals(otherPacket.packetName) && this.dataStream.equals(otherPacket.dataStream)) {
return true;
}
return false;
}
public int hashCode() {
return this.packetName.hashCode() ^ this.dataStream.hashCode();
}
}