static EnumSet<Feature> caps = EnumSet.of(Feature.Vector);
private Rectangle2D bounds;
- private final String nodeIdentifier;
- private final String svgDocument;
- private Point targetSize;
+ protected final String nodeIdentifier;
+ protected final String svgDocument;
+ protected Point targetSize;
public static SVGImage loadFromURL(String nodeIdentifier, URL url) throws IOException {
- InputStream in = url.openStream();
- try {
+ try (InputStream in = url.openStream()) {
return new SVGImage(nodeIdentifier, in);
- } finally {
- in.close();
}
}