AR arhives

Java library to work with AR archives

License

License

GroupId

GroupId

com.aerse
ArtifactId

ArtifactId

ar
Last Version

Last Version

2.4
Release Date

Release Date

Type

Type

jar
Description

Description

AR arhives
Java library to work with AR archives
Project URL

Project URL

https://github.com/dernasherbrezon/java-ar
Source Code Management

Source Code Management

https://github.com/dernasherbrezon/java-ar

Download ar

How to add to project

<!-- https://jarcasting.com/artifacts/com.aerse/ar/ -->
<dependency>
    <groupId>com.aerse</groupId>
    <artifactId>ar</artifactId>
    <version>2.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.aerse/ar/
implementation 'com.aerse:ar:2.4'
// https://jarcasting.com/artifacts/com.aerse/ar/
implementation ("com.aerse:ar:2.4")
'com.aerse:ar:jar:2.4'
<dependency org="com.aerse" name="ar" rev="2.4">
  <artifact name="ar" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.aerse', module='ar', version='2.4')
)
libraryDependencies += "com.aerse" % "ar" % "2.4"
[com.aerse/ar "2.4"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 3.8

Project Modules

There are no modules declared in this project.

Java library to work with AR arhives. For more info about format please consult: http://en.wikipedia.org/wiki/Ar_%28Unix%29

Features

  • input and output stream
  • support for GNU long file names

Maven support

Add dependency:

<dependency>
	<groupId>com.aerse</groupId>
	<artifactId>ar</artifactId>
	<version>2.4</version>
</dependency>

Read

InputStream is = ...
ArInputStream aris = null;
try {
	aris = new ArInputStream(is);
	ArEntry curEntry = null;
	while( (curEntry = aris.getNextEntry()) != null ) {
	    //process entry
	}
} catch(Exception e) {
	//do logging. handle exception
} finally {
	if( aris != null ) {
	    try {
	        aris.close();
	    } catch(IOException e) {
	        //do logging
	    }
	}
}

Write

OutputStream os = ...
ArEntry[] entries = ...
ArOutputStream aros = null;
try {
	aros = new ArOutputStream(os);
	aros.setEntries(entries);
} catch(Exception e) {
	//do logging. handle exception
} finally {
	if( aros != null ) {
	    try {
	        aros.close();
	    } catch(IOException e) {
	        //do logging
	    }
	}
}

Versions

Version
2.4