Skip to content

Commit f23924f

Browse files
EvgenyB1001iText-CI
authored andcommitted
Add missing javadocs
DEVSIX-4122
1 parent 79e7610 commit f23924f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/filespec/PdfFileSpec.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ protected PdfFileSpec(PdfObject pdfObject) {
7171
super(pdfObject);
7272
}
7373

74+
/**
75+
* Wrap the passed {@link PdfObject} to the specific {@link PdfFileSpec} object,
76+
* according to the type of the passed pdf object.
77+
*
78+
* @param fileSpecObject object to wrap
79+
* @return wrapped {@link PdfFileSpec} instance
80+
*/
7481
public static PdfFileSpec wrapFileSpecObject(PdfObject fileSpecObject) {
7582
if (fileSpecObject != null) {
7683
if (fileSpecObject.isString()) {
@@ -82,6 +89,16 @@ public static PdfFileSpec wrapFileSpecObject(PdfObject fileSpecObject) {
8289
return null;
8390
}
8491

92+
/**
93+
* Create an external file specification.
94+
*
95+
* @param doc {@link PdfDocument} instance to make this file specification indirect
96+
* @param filePath file specification string, describing the path to the external file
97+
* @param afRelationshipValue value that represents the relationship between the component of the passed PDF document
98+
* that refers to this file specification and the associated file. If <CODE>null</CODE>,
99+
* {@link PdfName#Unspecified} will be added.
100+
* @return {@link PdfFileSpec} containing the file specification of the file
101+
*/
85102
public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePath, PdfName afRelationshipValue) {
86103
PdfDictionary dict = new PdfDictionary();
87104
dict.put(PdfName.Type, PdfName.Filespec);
@@ -95,6 +112,13 @@ public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePat
95112
return (PdfFileSpec) new PdfFileSpec(dict).makeIndirect(doc);
96113
}
97114

115+
/**
116+
* Create an external file specification.
117+
*
118+
* @param doc {@link PdfDocument} instance to make this file specification indirect
119+
* @param filePath file specification string, describing the path to the external file
120+
* @return {@link PdfFileSpec} containing the file specification of the file
121+
*/
98122
public static PdfFileSpec createExternalFileSpec(PdfDocument doc, String filePath) {
99123
return createExternalFileSpec(doc, filePath, null);
100124
}

0 commit comments

Comments
 (0)