All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aQute.bnd.osgi.JarResource Maven / Gradle / Ivy

Go to download

The bndlib project is a general library to be used with OSGi bundles. It contains lots of cool functionality that calculates dependencies, etc.

There is a newer version: 2.4.0
Show newest version
package aQute.bnd.osgi;

import java.io.*;

public class JarResource extends WriteResource {
	Jar		jar;
	long	size	= -1;

	public JarResource(Jar jar) {
		this.jar = jar;
	}

	@Override
	public long lastModified() {
		return jar.lastModified();
	}

	@Override
	public void write(OutputStream out) throws Exception {
		try {
			jar.write(out);
		}
		catch (Exception e) {
			e.printStackTrace();
			throw e;
		}
	}

	public Jar getJar() {
		return jar;
	}

	@Override
	public String toString() {
		return ":" + jar.getName() + ":";
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy