org.osgi.service.indexer.impl.FlatStreamResource Maven / Gradle / Ivy
package org.osgi.service.indexer.impl;
import java.io.IOException;
import java.io.InputStream;
import java.util.Dictionary;
import java.util.Hashtable;
import java.util.List;
import java.util.jar.Manifest;
import org.osgi.service.indexer.Resource;
class FlatStreamResource implements Resource {
private final String location;
private final InputStream stream;
private final Dictionary properties = new Hashtable();
FlatStreamResource(String name, String location, InputStream stream) {
this.location = location;
this.stream = stream;
properties.put(NAME, name);
properties.put(LOCATION, location);
}
public String getLocation() {
return location;
}
public Dictionary getProperties() {
return properties;
}
public long getSize() {
return 0L;
}
public InputStream getStream() throws IOException {
return stream;
}
public Manifest getManifest() throws IOException {
return null;
}
public List listChildren(String prefix) throws IOException {
return null;
}
public Resource getChild(String path) throws IOException {
return null;
}
public void close() {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy