Skip to content

Commit

Permalink
Update file(s) "/." from "aspose-zip/Aspose.ZIP-API-References"
Browse files Browse the repository at this point in the history
  • Loading branch information
VadimYurko committed Jan 31, 2025
1 parent d099d42 commit bce6d6b
Show file tree
Hide file tree
Showing 111 changed files with 456 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ url: /java/com.aspose.zip/
| [ArchiveInstanceInfo](../com.aspose.zip/archiveinstanceinfo) | Represents information about the archive instance. |
| [ArchiveLoadOptions](../com.aspose.zip/archiveloadoptions) | Options with which archive is loaded from compressed file. |
| [ArchiveSaveOptions](../com.aspose.zip/archivesaveoptions) | Options for saving a zip archive. |
| [ArjArchive](../com.aspose.zip/arjarchive) | This class represents ARJ archive file. |
| [ArjEntryPlain](../com.aspose.zip/arjentryplain) | Represents single file within ARJ archive. |
| [Bzip2Archive](../com.aspose.zip/bzip2archive) | This class represents bzip2 archive file. |
| [Bzip2CompressionSettings](../com.aspose.zip/bzip2compressionsettings) | Settings for Bzip2 compression method. |
| [Bzip2LoadOptions](../com.aspose.zip/bzip2loadoptions) | Options for loading [Bzip2Archive](../com.aspose.zip/bzip2archive). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: ArchiveFormat
second_title: Aspose.ZIP for Java API Reference
description: Supported archive formats.
type: docs
weight: 122
weight: 124
url: /java/com.aspose.zip/archiveformat/
---

Expand All @@ -18,6 +18,7 @@ Supported archive formats.

| Field | Description |
| --- | --- |
| [Arj](#Arj) | Arj archive ([ArjArchive](../../com.aspose.zip/arjarchive)). |
| [Bzip2](#Bzip2) | Bzip2 archive ([Bzip2Archive](../../com.aspose.zip/bzip2archive)). |
| [Cab](#Cab) | Cab archive ([CabArchive](../../com.aspose.zip/cabarchive)). |
| [Cpio](#Cpio) | Cpio archive ([CpioArchive](../../com.aspose.zip/cpioarchive)). |
Expand All @@ -44,6 +45,14 @@ Supported archive formats.
| --- | --- |
| [valueOf(String name)](#valueOf-java.lang.String-) | |
| [values()](#values--) | |
### Arj {#Arj}
```
public static final ArchiveFormat Arj
```


Arj archive ([ArjArchive](../../com.aspose.zip/arjarchive)).

### Bzip2 {#Bzip2}
```
public static final ArchiveFormat Bzip2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
title: ArjArchive
second_title: Aspose.ZIP for Java API Reference
description: This class represents ARJ archive file.
type: docs
weight: 21
url: /java/com.aspose.zip/arjarchive/
---

**Inheritance:**
java.lang.Object

**All Implemented Interfaces:**
[com.aspose.zip.IArchive](../../com.aspose.zip/iarchive), java.lang.AutoCloseable
```
public class ArjArchive implements IArchive, AutoCloseable
```

This class represents ARJ archive file.

Only following compression methods are supported:

| ------ | ------------------------------------------------------------ |
| Method | Explanation |
| 0 | Uncompressed |
| 1 | Combination of LZ77 and adaptive Huffman coding. Best ratio. |
| 2 | Combination of LZ77 and adaptive Huffman coding. |
| 3 | Combination of LZ77 and adaptive Huffman coding. Best speed. |
## Constructors

| Constructor | Description |
| --- | --- |
| [ArjArchive(InputStream extractionSource)](#ArjArchive-java.io.InputStream-) | Initializes a new instance of the [ArjArchive](../../com.aspose.zip/arjarchive) class and composes entries list can be extracted from the archive. |
| [ArjArchive(String path)](#ArjArchive-java.lang.String-) | Initializes a new instance of the [ArjArchive](../../com.aspose.zip/arjarchive) class and composes entries list can be extracted from the archive. |
## Methods

| Method | Description |
| --- | --- |
| [close()](#close--) | \{@inheritDoc\} |
| [extractToDirectory(String destinationDirectory)](#extractToDirectory-java.lang.String-) | Extracts all entries to the specified directory. |
| [getCommentary()](#getCommentary--) | Gets the commentary. |
| [getEntries()](#getEntries--) | Gets entries of [ArjEntryPlain](../../com.aspose.zip/arjentryplain) type constituting the ARJ archive. |
| [getFileEntries()](#getFileEntries--) | Gets entries of [IArchiveFileEntry](../../com.aspose.zip/iarchivefileentry) type constituting the archive. |
| [getName()](#getName--) | Gets the original name. |
### ArjArchive(InputStream extractionSource) {#ArjArchive-java.io.InputStream-}
```
public ArjArchive(InputStream extractionSource)
```


Initializes a new instance of the [ArjArchive](../../com.aspose.zip/arjarchive) class and composes entries list can be extracted from the archive.

This constructor does not decompress any entry. See [ArjEntryPlain.extract(java.io.OutputStream)](../../com.aspose.zip/arjentryplain\#extract-java.io.OutputStream-) method for decompressing.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| extractionSource | java.io.InputStream | the source of the archive |

### ArjArchive(String path) {#ArjArchive-java.lang.String-}
```
public ArjArchive(String path)
```


Initializes a new instance of the [ArjArchive](../../com.aspose.zip/arjarchive) class and composes entries list can be extracted from the archive.

The following example shows how to extract all of the entries to a directory.

```
using (var archive = new ArjArchive("archive.arj"))
{
archive.ExtractToDirectory("C:\extracted");
}
```

This constructor does not unpack any entry. See [ArjEntryPlain.extract(java.io.OutputStream)](../../com.aspose.zip/arjentryplain\#extract-java.io.OutputStream-) method for decompressing.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| path | java.lang.String | the path to the archive file |

### close() {#close--}
```
public void close()
```




### extractToDirectory(String destinationDirectory) {#extractToDirectory-java.lang.String-}
```
public final void extractToDirectory(String destinationDirectory)
```


Extracts all entries to the specified directory.

The following example shows how to extract all entries to a directory:

```
try (ArjArchive archive = new ArjArchive(new FileInputStream("archive.arj"))) {
archive.extractToDirectory("C:\\extracted");
} catch (IOException ex) {
}
```



**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| destinationDirectory | java.lang.String | the directory to extract the entries to |

### getCommentary() {#getCommentary--}
```
public final String getCommentary()
```


Gets the commentary.

**Returns:**
java.lang.String - the commentary.
### getEntries() {#getEntries--}
```
public final List<ArjEntryPlain> getEntries()
```


Gets entries of [ArjEntryPlain](../../com.aspose.zip/arjentryplain) type constituting the ARJ archive.

**Returns:**
java.util.List&lt;com.aspose.zip.ArjEntryPlain&gt; - entries of [ArjEntryPlain](../../com.aspose.zip/arjentryplain) type constituting the ARJ archive.
### getFileEntries() {#getFileEntries--}
```
public final Iterable<IArchiveFileEntry> getFileEntries()
```


Gets entries of [IArchiveFileEntry](../../com.aspose.zip/iarchivefileentry) type constituting the archive.

**Returns:**
java.lang.Iterable&lt;com.aspose.zip.IArchiveFileEntry&gt; - entries of [IArchiveFileEntry](../../com.aspose.zip/iarchivefileentry) type constituting the archive
### getName() {#getName--}
```
public final String getName()
```


Gets the original name.

**Returns:**
java.lang.String - the original name.
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: ArjEntryPlain
second_title: Aspose.ZIP for Java API Reference
description: Represents single file within ARJ archive.
type: docs
weight: 22
url: /java/com.aspose.zip/arjentryplain/
---

**Inheritance:**
java.lang.Object

**All Implemented Interfaces:**
[com.aspose.zip.IArchiveFileEntry](../../com.aspose.zip/iarchivefileentry)
```
public class ArjEntryPlain implements IArchiveFileEntry
```

Represents single file within ARJ archive.
## Methods

| Method | Description |
| --- | --- |
| [extract(File file)](#extract-java.io.File-) | Extracts ARJ archive entry to a file. |
| [extract(OutputStream destination)](#extract-java.io.OutputStream-) | Extracts the entry to the stream provided. |
| [extract(String path)](#extract-java.lang.String-) | Extracts the entry to the filesystem by the path provided. |
| [getCompressedSize()](#getCompressedSize--) | Gets size of compressed file. |
| [getLength()](#getLength--) | Gets the length of the entry in bytes. |
| [getName()](#getName--) | Gets name of the entry within archive. |
| [getUncompressedSize()](#getUncompressedSize--) | Gets size of original file. |
### extract(File file) {#extract-java.io.File-}
```
public final void extract(File file)
```


Extracts ARJ archive entry to a file.

```
try (FileInputStream arjFile = new FileInputStream("sourceFileName")) {
try (ArjArchive archive = new ArjArchive(arjFile)) {
archive.getEntries().get(0).extract(new File("extracted.bin"));
}
} catch (IOException ex) {
}
```



**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| file | java.io.File | java.io.File for storing decompressed data |

### extract(OutputStream destination) {#extract-java.io.OutputStream-}
```
public final void extract(OutputStream destination)
```


Extracts the entry to the stream provided.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| destination | java.io.OutputStream | Destination stream. Must be writable. |

### extract(String path) {#extract-java.lang.String-}
```
public final File extract(String path)
```


Extracts the entry to the filesystem by the path provided.

Extract two entries of rar archive.

```
try (FileInputStream arjFile = new FileInputStream("archive.arj")) {
try (ArjArchive archive = new ArjArchive(arjFile)) {
archive.getEntries().get(0).extract("first.bin");
archive.getEntries().get(1).extract("second.bin");
}
} catch (IOException ex) {
}
```



**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| path | java.lang.String | the path to destination file. If the file already exists, it will be overwritten |

**Returns:**
java.io.File - the file info of composed file
### getCompressedSize() {#getCompressedSize--}
```
public final long getCompressedSize()
```


Gets size of compressed file.

**Returns:**
long - size of compressed file
### getLength() {#getLength--}
```
public final Long getLength()
```


Gets the length of the entry in bytes.

**Returns:**
java.lang.Long - the length of the entry in bytes
### getName() {#getName--}
```
public final String getName()
```


Gets name of the entry within archive.

**Returns:**
java.lang.String - name of the entry within archive
### getUncompressedSize() {#getUncompressedSize--}
```
public final long getUncompressedSize()
```


Gets size of original file.

**Returns:**
long - size of original file
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Bzip2Archive
second_title: Aspose.ZIP for Java API Reference
description: This class represents bzip2 archive file.
type: docs
weight: 21
weight: 23
url: /java/com.aspose.zip/bzip2archive/
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Bzip2CompressionSettings
second_title: Aspose.ZIP for Java API Reference
description: Settings for Bzip2 compression method.
type: docs
weight: 22
weight: 24
url: /java/com.aspose.zip/bzip2compressionsettings/
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Bzip2LoadOptions
second_title: Aspose.ZIP for Java API Reference
description: Options for loading .
type: docs
weight: 23
weight: 25
url: /java/com.aspose.zip/bzip2loadoptions/
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Bzip2SaveOptions
second_title: Aspose.ZIP for Java API Reference
description: Options for saving a bzip2 archive.
type: docs
weight: 24
weight: 26
url: /java/com.aspose.zip/bzip2saveoptions/
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: CabArchive
second_title: Aspose.ZIP for Java API Reference
description: This class represents cab archive file.
type: docs
weight: 25
weight: 27
url: /java/com.aspose.zip/cabarchive/
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: CabEntry
second_title: Aspose.ZIP for Java API Reference
description: Represents single file within cab archive.
type: docs
weight: 26
weight: 28
url: /java/com.aspose.zip/cabentry/
---

Expand Down
Loading

0 comments on commit bce6d6b

Please sign in to comment.