You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/sites/groupdocs/parser/english/java/_index.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,17 @@ is_root: true
10
10
## Packages
11
11
| Package | Description |
12
12
| --- | --- |
13
-
|[com.groupdocs.parser](./com.groupdocs.parser)| The package provides classes for parsing data from documents. |
14
-
|[com.groupdocs.parser.data](./com.groupdocs.parser.data)| The package provides classes which represent parsing results. |
15
-
|[com.groupdocs.parser.exceptions](./com.groupdocs.parser.exceptions)| The package provides different exceptions classes. |
16
-
|[com.groupdocs.parser.export](./com.groupdocs.parser.export)| The package provides classes that allow users to export data to different formats. |
17
-
|[com.groupdocs.parser.licensing](./com.groupdocs.parser.licensing)| The package provides classes to set license or use Metered billing. |
18
-
|[com.groupdocs.parser.options](./com.groupdocs.parser.options)| The package provides classes to specify additional options when parsing data from documents. |
19
-
|[com.groupdocs.parser.templates](./com.groupdocs.parser.templates)| The package provides classes for creating templates for parsing document data. |
13
+
| [com.groupdocs.parser](./com.groupdocs.parser) | The package provides classes for parsing data from documents.
14
+
|
15
+
| [com.groupdocs.parser.data](./com.groupdocs.parser.data) | The package provides classes which represent parsing results.
16
+
|
17
+
| [com.groupdocs.parser.exceptions](./com.groupdocs.parser.exceptions) | The package provides different exceptions classes.
18
+
|
19
+
| [com.groupdocs.parser.export](./com.groupdocs.parser.export) | The package provides classes that allow users to export data to different formats.
20
+
|
21
+
| [com.groupdocs.parser.licensing](./com.groupdocs.parser.licensing) | The package provides classes to set license or use Metered billing.
22
+
|
23
+
| [com.groupdocs.parser.options](./com.groupdocs.parser.options) | The package provides classes to specify additional options when parsing data from documents.
24
+
|
25
+
| [com.groupdocs.parser.templates](./com.groupdocs.parser.templates) | The package provides classes for creating templates for parsing document data.
Copy file name to clipboardExpand all lines: content/sites/groupdocs/parser/english/java/com.groupdocs.parser.data/containeritem/_index.md
+86-33Lines changed: 86 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,28 +14,42 @@ public abstract class ContainerItem
14
14
15
15
Represents a container item like Zip archive entity, email attachment, PDF Portfolio item and so on.
16
16
17
-
An instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) class is used as return value of [Parser.getContainer()](../../com.groupdocs.parser/parser\#getContainer--) method. See the usage examples there.
17
+
An instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) class is used as return value of [Parser.getContainer()](../../com.groupdocs.parser/parser#getContainer--) method. See the usage examples there.
18
+
18
19
## Constructors
19
20
20
21
| Constructor | Description |
21
22
| --- | --- |
22
-
|[ContainerItem(String name, String directory, long size, Iterable<MetadataItem> metadata)](#ContainerItem-java.lang.String-java.lang.String-long-java.lang.Iterable-com.groupdocs.parser.data.MetadataItem--)| Initializes a new instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) with the item name and directory. |
23
-
|[ContainerItem(String filePath, long size, Iterable<MetadataItem> metadata)](#ContainerItem-java.lang.String-long-java.lang.Iterable-com.groupdocs.parser.data.MetadataItem--)| Initializes a new instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) with the item full path. |
23
+
| [ContainerItem(String name, String directory, long size, Iterable<MetadataItem> metadata)](#ContainerItem-java.lang.String-java.lang.String-long-java.lang.Iterable-com.groupdocs.parser.data.MetadataItem--) | Initializes a new instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) with the item name and directory.
24
+
|
25
+
| [ContainerItem(String filePath, long size, Iterable<MetadataItem> metadata)](#ContainerItem-java.lang.String-long-java.lang.Iterable-com.groupdocs.parser.data.MetadataItem--) | Initializes a new instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) with the item full path.
26
+
|
24
27
## Methods
25
28
26
29
| Method | Description |
27
30
| --- | --- |
28
-
|[getName()](#getName--)| Gets the name of the item. |
29
-
|[getDirectory()](#getDirectory--)| Gets the directory of the item. |
30
-
|[getFilePath()](#getFilePath--)| Gets the full path of the item. |
31
-
|[getSize()](#getSize--)| Gets the size of the item. |
32
-
|[getMetadata()](#getMetadata--)| Gets the collection of metadata items. |
33
-
|[getMetadataValue(String name)](#getMetadataValue-java.lang.String-)| Gets the metadata value. |
34
-
|[openStream()](#openStream--)| Opens the stream of the item content. |
35
-
|[openParser()](#openParser--)| Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content. |
36
-
|[openParser(LoadOptions loadOptions)](#openParser-com.groupdocs.parser.options.LoadOptions-)| Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content with [LoadOptions](../../com.groupdocs.parser.options/loadoptions). |
37
-
|[openParser(LoadOptions loadOptions, ParserSettings parserSettings)](#openParser-com.groupdocs.parser.options.LoadOptions-com.groupdocs.parser.options.ParserSettings-)| Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content with [LoadOptions](../../com.groupdocs.parser.options/loadoptions) and [ParserSettings](../../com.groupdocs.parser.options/parsersettings). |
38
-
|[detectFileType(FileTypeDetectionMode detectionMode)](#detectFileType-com.groupdocs.parser.options.FileTypeDetectionMode-)| Detects a file type of the container item. |
31
+
| [getName()](#getName--) | Gets the name of the item.
32
+
|
33
+
| [getDirectory()](#getDirectory--) | Gets the directory of the item.
34
+
|
35
+
| [getFilePath()](#getFilePath--) | Gets the full path of the item.
36
+
|
37
+
| [getSize()](#getSize--) | Gets the size of the item.
38
+
|
39
+
| [getMetadata()](#getMetadata--) | Gets the collection of metadata items.
40
+
|
41
+
| [getMetadataValue(String name)](#getMetadataValue-java.lang.String-) | Gets the metadata value.
42
+
|
43
+
| [openStream()](#openStream--) | Opens the stream of the item content.
44
+
|
45
+
| [openParser()](#openParser--) | Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content.
46
+
|
47
+
| [openParser(LoadOptions loadOptions)](#openParser-com.groupdocs.parser.options.LoadOptions-) | Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content with [LoadOptions](../../com.groupdocs.parser.options/loadoptions).
48
+
|
49
+
| [openParser(LoadOptions loadOptions, ParserSettings parserSettings)](#openParser-com.groupdocs.parser.options.LoadOptions-com.groupdocs.parser.options.ParserSettings-) | Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content with [LoadOptions](../../com.groupdocs.parser.options/loadoptions) and [ParserSettings](../../com.groupdocs.parser.options/parsersettings).
50
+
|
51
+
| [detectFileType(FileTypeDetectionMode detectionMode)](#detectFileType-com.groupdocs.parser.options.FileTypeDetectionMode-) | Detects a file type of the container item.
52
+
|
39
53
### ContainerItem(String name, String directory, long size, Iterable<MetadataItem> metadata) {#ContainerItem-java.lang.String-java.lang.String-long-java.lang.Iterable-com.groupdocs.parser.data.MetadataItem--}
40
54
```
41
55
public ContainerItem(String name, String directory, long size, Iterable<MetadataItem> metadata)
@@ -44,13 +58,18 @@ public ContainerItem(String name, String directory, long size, Iterable<Metadata
44
58
45
59
Initializes a new instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) with the item name and directory.
46
60
61
+
47
62
**Parameters:**
48
63
| Parameter | Type | Description |
49
64
| --- | --- | --- |
50
-
| name | java.lang.String | The name of the item. |
51
-
| directory | java.lang.String | The directory of the item. |
52
-
| size | long | The size of the item. |
53
-
| metadata | java.lang.Iterable<com.groupdocs.parser.data.MetadataItem> | The collection of metadata items. |
65
+
| name | java.lang.String | The name of the item.
66
+
|
67
+
| directory | java.lang.String | The directory of the item.
68
+
|
69
+
| size | long | The size of the item.
70
+
|
71
+
| metadata | java.lang.Iterable<com.groupdocs.parser.data.MetadataItem> | The collection of metadata items.
72
+
|
54
73
55
74
### ContainerItem(String filePath, long size, Iterable<MetadataItem> metadata) {#ContainerItem-java.lang.String-long-java.lang.Iterable-com.groupdocs.parser.data.MetadataItem--}
56
75
```
@@ -60,12 +79,16 @@ public ContainerItem(String filePath, long size, Iterable<MetadataItem> metadata
60
79
61
80
Initializes a new instance of [ContainerItem](../../com.groupdocs.parser.data/containeritem) with the item full path.
62
81
82
+
63
83
**Parameters:**
64
84
| Parameter | Type | Description |
65
85
| --- | --- | --- |
66
-
| filePath | java.lang.String | The full path of the item. |
67
-
| size | long | The size of the item. |
68
-
| metadata | java.lang.Iterable<com.groupdocs.parser.data.MetadataItem> | The collection of metadata items. |
86
+
| filePath | java.lang.String | The full path of the item.
87
+
|
88
+
| size | long | The size of the item.
89
+
|
90
+
| metadata | java.lang.Iterable<com.groupdocs.parser.data.MetadataItem> | The collection of metadata items.
91
+
|
69
92
70
93
### getName() {#getName--}
71
94
```
@@ -75,8 +98,10 @@ public String getName()
75
98
76
99
Gets the name of the item.
77
100
101
+
78
102
**Returns:**
79
103
java.lang.String - A string value that represents the file name of the item (without a directory).
104
+
80
105
### getDirectory() {#getDirectory--}
81
106
```
82
107
public String getDirectory()
@@ -85,8 +110,10 @@ public String getDirectory()
85
110
86
111
Gets the directory of the item.
87
112
113
+
88
114
**Returns:**
89
115
java.lang.String - A string value that represents the directory of the item (without a file name).
116
+
90
117
### getFilePath() {#getFilePath--}
91
118
```
92
119
public String getFilePath()
@@ -95,8 +122,10 @@ public String getFilePath()
95
122
96
123
Gets the full path of the item.
97
124
125
+
98
126
**Returns:**
99
127
java.lang.String - A string value that represents the full path of the item.
128
+
100
129
### getSize() {#getSize--}
101
130
```
102
131
public long getSize()
@@ -105,8 +134,10 @@ public long getSize()
105
134
106
135
Gets the size of the item.
107
136
137
+
108
138
**Returns:**
109
139
long - An integer value that represents the size of the item in bytes.
140
+
110
141
### getMetadata() {#getMetadata--}
111
142
```
112
143
public Iterable<MetadataItem> getMetadata()
@@ -115,8 +146,10 @@ public Iterable<MetadataItem> getMetadata()
115
146
116
147
Gets the collection of metadata items.
117
148
149
+
118
150
**Returns:**
119
151
java.lang.Iterable<com.groupdocs.parser.data.MetadataItem> - A collection of [MetadataItem](../../com.groupdocs.parser.data/metadataitem) objects; empty if metadata isn't set.
@@ -160,13 +200,16 @@ public Parser openParser(LoadOptions loadOptions)
160
200
161
201
Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content with [LoadOptions](../../com.groupdocs.parser.options/loadoptions).
162
202
203
+
163
204
**Parameters:**
164
205
| Parameter | Type | Description |
165
206
| --- | --- | --- |
166
-
| loadOptions |[LoadOptions](../../com.groupdocs.parser.options/loadoptions)| The options to open the item content. |
207
+
| loadOptions | [LoadOptions](../../com.groupdocs.parser.options/loadoptions) | The options to open the item content.
208
+
|
167
209
168
210
**Returns:**
169
211
[Parser](../../com.groupdocs.parser/parser) - An instance of [Parser](../../com.groupdocs.parser/parser) class of the item content.
Creates the [Parser](../../com.groupdocs.parser/parser) object for the item content with [LoadOptions](../../com.groupdocs.parser.options/loadoptions) and [ParserSettings](../../com.groupdocs.parser.options/parsersettings).
177
220
221
+
178
222
**Parameters:**
179
223
| Parameter | Type | Description |
180
224
| --- | --- | --- |
181
-
| loadOptions |[LoadOptions](../../com.groupdocs.parser.options/loadoptions)| The options to open the item content. |
182
-
| parserSettings |[ParserSettings](../../com.groupdocs.parser.options/parsersettings)| The parser settings which are used to customize data extraction. |
225
+
| loadOptions | [LoadOptions](../../com.groupdocs.parser.options/loadoptions) | The options to open the item content.
226
+
|
227
+
| parserSettings | [ParserSettings](../../com.groupdocs.parser.options/parsersettings) | The parser settings which are used to customize data extraction.
228
+
|
183
229
184
230
**Returns:**
185
231
[Parser](../../com.groupdocs.parser/parser) - An instance of [Parser](../../com.groupdocs.parser/parser) class of the item content.
public abstract FileType detectFileType(FileTypeDetectionMode detectionMode)
@@ -191,15 +238,17 @@ public abstract FileType detectFileType(FileTypeDetectionMode detectionMode)
191
238
192
239
Detects a file type of the container item.
193
240
194
-
detectionMode parameter provides the ability to control file type detection:
195
241
196
-
***Default**. The file type is detected by the file extension; if the file extension isn't recognized, the file type is detected by the file content.
197
-
***Extension**.The file type is detected only by the file extension.
198
-
***Content**. The file type is detected only by the file content.
242
+
detectionMode
243
+
parameter provides the ability to control file type detection:
244
+
245
+
***Default**. The file type is detected by the file extension; if the file extension isn't recognized, the file type is detected by the file content.
246
+
***Extension**.The file type is detected only by the file extension.
247
+
***Content**. The file type is detected only by the file content.
199
248
200
249
The following example shows how to detect file type of container item:
201
250
202
-
```
251
+
````
203
252
// Create an instance of Parser class
204
253
try (Parser parser = new Parser(filePath)) {
205
254
// Extract attachments from the container
@@ -217,12 +266,16 @@ The following example shows how to detect file type of container item:
217
266
}
218
267
}
219
268
220
-
```
269
+
````
270
+
271
+
221
272
222
273
**Parameters:**
223
274
| Parameter | Type | Description |
224
275
| --- | --- | --- |
225
-
| detectionMode |[FileTypeDetectionMode](../../com.groupdocs.parser.options/filetypedetectionmode)| Defines a mode of the file type detection. |
276
+
| detectionMode | [FileTypeDetectionMode](../../com.groupdocs.parser.options/filetypedetectionmode) | Defines a mode of the file type detection.
277
+
|
226
278
227
279
**Returns:**
228
-
[FileType](../../com.groupdocs.parser.options/filetype) - An instance of [FileType](../../com.groupdocs.parser.options/filetype) class; [FileType.Unknown](../../com.groupdocs.parser.options/filetype\#Unknown) if a file type isn't detected.
280
+
[FileType](../../com.groupdocs.parser.options/filetype) - An instance of [FileType](../../com.groupdocs.parser.options/filetype) class; [FileType.Unknown](../../com.groupdocs.parser.options/filetype#Unknown) if a file type isn't detected.
0 commit comments