Bundle bundle = Platform.getBundle(Activator.PLUGIN_ID);

URL entry = bundle.getEntry("/filename");


InputStream is = entry.openStream();

ByteArrayOutputStream baos = new ByteArrayOutputStream();

byte[] bb = new byte[4096];

int read = 0;

while ((read = is.read(bb)) > 0) {

baos.write(bb, 0, read);

}

baos.close();

is.close();


Posted by orange code

티스토리 툴바