mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
guava 19
This commit is contained in:
@@ -135,12 +135,13 @@ public class LauncherGenerator {
|
||||
|
||||
public void injectIcon(int id, final InputStream iconStream) throws IOException {
|
||||
File f = File.createTempFile("launcher", "ico");
|
||||
Files.copy(new InputSupplier<InputStream>() {
|
||||
@Override
|
||||
public InputStream getInput() throws IOException {
|
||||
return iconStream;
|
||||
}
|
||||
}, f);
|
||||
|
||||
try {
|
||||
Files.asByteSink(f).writeFrom(iconStream);
|
||||
}
|
||||
finally {
|
||||
iconStream.close();
|
||||
}
|
||||
IconResourceInjector iconInjector = new IconResourceInjector();
|
||||
iconInjector.injectIcon(f, myRoot, "IRD" + id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user