// Read the icon's byte data and decode it to determine the size.
final byte[] iconData = getBytesFromStream(iconStream);
assert iconData != null;
final String strongname = Util.computeStrongName(iconData)
+ getIconExtension(icon);
result[i] = new IconInfo(strongname, getImageSize(iconData));
// Write the icon's bytes into GWT resource.
try {
final OutputStream resStream = context.tryCreateResource(logger,
strongname);