diff --git a/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java b/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java
index f06dff741..ab4b3deaa 100644
--- a/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java
+++ b/src/ext/plantuml/com/ctreber/acearth/gui/PixelCanvas.java
@@ -7,7 +7,7 @@ import java.io.IOException;
import java.io.OutputStream;
import ext.plantuml.com.ctreber.acearth.renderer.RenderTarget;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
/**
*
@@ -58,7 +58,7 @@ public class PixelCanvas implements RenderTarget {
}
public void saveToImage(OutputStream os) throws IOException {
- ImageIO.write(fEarthImage2, "png", os);
+ SImageIO.write(fEarthImage2, "png", os);
}
}
diff --git a/src/net/sourceforge/plantuml/ClipboardLoop.java b/src/net/sourceforge/plantuml/ClipboardLoop.java
index cd0da6723..160408e5c 100644
--- a/src/net/sourceforge/plantuml/ClipboardLoop.java
+++ b/src/net/sourceforge/plantuml/ClipboardLoop.java
@@ -45,7 +45,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import net.sourceforge.plantuml.core.DiagramDescription;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
public class ClipboardLoop {
@@ -88,7 +88,7 @@ public class ClipboardLoop {
} else {
Log.info("Image ok " + desc.getDescription());
baos.close();
- final BufferedImage image = ImageIO.read(baos.toByteArray());
+ final BufferedImage image = SImageIO.read(baos.toByteArray());
setClipboardImage(image);
Log.info("Image copied in clipboard");
}
diff --git a/src/net/sourceforge/plantuml/EmbeddedDiagram.java b/src/net/sourceforge/plantuml/EmbeddedDiagram.java
index 2733cd458..547ded584 100644
--- a/src/net/sourceforge/plantuml/EmbeddedDiagram.java
+++ b/src/net/sourceforge/plantuml/EmbeddedDiagram.java
@@ -50,7 +50,7 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
import net.sourceforge.plantuml.graphic.Line;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.preproc.Defines;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
import net.sourceforge.plantuml.ugraphic.PixelImage;
import net.sourceforge.plantuml.ugraphic.UGraphic;
@@ -186,7 +186,7 @@ public class EmbeddedDiagram implements CharSequence {
final ByteArrayOutputStream os = new ByteArrayOutputStream();
system.exportDiagram(os, 0, new FileFormatOption(FileFormat.PNG));
os.close();
- return ImageIO.read(os.toByteArray());
+ return SImageIO.read(os.toByteArray());
}
public HorizontalAlignment getHorizontalAlignment() {
diff --git a/src/net/sourceforge/plantuml/Run.java b/src/net/sourceforge/plantuml/Run.java
index a599864b6..ff32156ec 100644
--- a/src/net/sourceforge/plantuml/Run.java
+++ b/src/net/sourceforge/plantuml/Run.java
@@ -63,7 +63,7 @@ import net.sourceforge.plantuml.ftp.FtpServer;
import net.sourceforge.plantuml.picoweb.PicoWebServer;
import net.sourceforge.plantuml.png.MetadataTag;
import net.sourceforge.plantuml.preproc.Stdlib;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SecurityUtils;
import net.sourceforge.plantuml.sprite.SpriteGrayLevel;
@@ -299,7 +299,7 @@ public class Run {
final BufferedImage im;
try (InputStream stream = source.openStream()) {
- im = ImageIO.read(stream);
+ im = SImageIO.read(stream);
}
final String name = getSpriteName(fileName);
final String s = compressed ? SpriteUtils.encodeCompressed(im, name, level)
diff --git a/src/net/sourceforge/plantuml/UmlDiagram.java b/src/net/sourceforge/plantuml/UmlDiagram.java
index a372e25f2..dcf13e15a 100644
--- a/src/net/sourceforge/plantuml/UmlDiagram.java
+++ b/src/net/sourceforge/plantuml/UmlDiagram.java
@@ -66,7 +66,7 @@ import net.sourceforge.plantuml.graphic.GraphicStrings;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.mjpeg.MJPEGGenerator;
import net.sourceforge.plantuml.pdf.PdfConverter;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SecurityUtils;
import net.sourceforge.plantuml.style.NoStyleAvailableException;
@@ -269,7 +269,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
// exportDiagramTOxxBEREMOVED(baos, null, 0, new
// FileFormatOption(FileFormat.PNG, at));
baos.close();
- final BufferedImage im = ImageIO.read(baos.toByteArray());
+ final BufferedImage im = SImageIO.read(baos.toByteArray());
m.addImage(im);
}
m.finishAVI();
diff --git a/src/net/sourceforge/plantuml/command/CommandSpriteFile.java b/src/net/sourceforge/plantuml/command/CommandSpriteFile.java
index b6f79380f..2ab0fc816 100644
--- a/src/net/sourceforge/plantuml/command/CommandSpriteFile.java
+++ b/src/net/sourceforge/plantuml/command/CommandSpriteFile.java
@@ -50,8 +50,8 @@ import net.sourceforge.plantuml.command.regex.IRegex;
import net.sourceforge.plantuml.command.regex.RegexConcat;
import net.sourceforge.plantuml.command.regex.RegexLeaf;
import net.sourceforge.plantuml.command.regex.RegexResult;
-import net.sourceforge.plantuml.security.ImageIO;
import net.sourceforge.plantuml.security.SFile;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.sprite.Sprite;
import net.sourceforge.plantuml.sprite.SpriteImage;
import net.sourceforge.plantuml.sprite.SpriteSvg;
@@ -83,7 +83,7 @@ public class CommandSpriteFile extends SingleLineCommand2 {
if (is == null) {
return CommandExecutionResult.error("No such internal sprite: " + inner);
}
- sprite = new SpriteImage(ImageIO.read(is));
+ sprite = new SpriteImage(SImageIO.read(is));
} else if (src.contains("~")) {
final int idx = src.lastIndexOf("~");
final SFile f = FileSystem.getInstance().getFile(src.substring(0, idx));
@@ -139,7 +139,7 @@ public class CommandSpriteFile extends SingleLineCommand2 {
if (isSvg(name)) {
return new SpriteSvg(FileUtils.readSvg(zis));
} else {
- return new SpriteImage(ImageIO.read(zis));
+ return new SpriteImage(SImageIO.read(zis));
}
}
ze = zis.getNextEntry();
diff --git a/src/net/sourceforge/plantuml/creole/atom/AtomImg.java b/src/net/sourceforge/plantuml/creole/atom/AtomImg.java
index 6a4e5b240..7aacb664d 100644
--- a/src/net/sourceforge/plantuml/creole/atom/AtomImg.java
+++ b/src/net/sourceforge/plantuml/creole/atom/AtomImg.java
@@ -54,7 +54,7 @@ import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.ImgValign;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TileImageSvg;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SURL;
import net.sourceforge.plantuml.security.SecurityProfile;
@@ -158,7 +158,7 @@ public class AtomImg extends AbstractAtom implements Atom {
private static Atom buildRasterFromData(String source, final FontConfiguration fc, final byte[] data, double scale,
Url url) throws IOException {
- final BufferedImage read = ImageIO.read(data);
+ final BufferedImage read = SImageIO.read(data);
if (read == null) {
return AtomTextUtils.createLegacy("(Cannot decode: " + source + ")", fc);
}
diff --git a/src/net/sourceforge/plantuml/dedication/PSystemDedication.java b/src/net/sourceforge/plantuml/dedication/PSystemDedication.java
index 503879753..ab9770da0 100644
--- a/src/net/sourceforge/plantuml/dedication/PSystemDedication.java
+++ b/src/net/sourceforge/plantuml/dedication/PSystemDedication.java
@@ -47,7 +47,7 @@ import net.sourceforge.plantuml.PlainDiagram;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.graphic.UDrawable;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
import net.sourceforge.plantuml.ugraphic.PixelImage;
import net.sourceforge.plantuml.ugraphic.UGraphic;
@@ -77,7 +77,7 @@ public class PSystemDedication extends PlainDiagram {
final Object vp8Decoder = clVP8Decoder.newInstance();
// final VP8Decoder vp8Decoder = new VP8Decoder();
final Method decodeFrame = clVP8Decoder.getMethod("decodeFrame", ImageInputStream.class);
- final ImageInputStream iis = ImageIO.createImageInputStream(is);
+ final ImageInputStream iis = SImageIO.createImageInputStream(is);
decodeFrame.invoke(vp8Decoder, iis);
// vp8Decoder.decodeFrame(iis);
iis.close();
diff --git a/src/net/sourceforge/plantuml/ditaa/PSystemDitaa.java b/src/net/sourceforge/plantuml/ditaa/PSystemDitaa.java
index 2d54b6c13..9fd9f422c 100644
--- a/src/net/sourceforge/plantuml/ditaa/PSystemDitaa.java
+++ b/src/net/sourceforge/plantuml/ditaa/PSystemDitaa.java
@@ -51,7 +51,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.svek.GraphvizCrash;
public class PSystemDitaa extends AbstractPSystem {
@@ -141,7 +141,7 @@ public class PSystemDitaa extends AbstractPSystem {
renderingOptions.getClass());
final BufferedImage image = (BufferedImage) renderToImage.invoke(bitmapRenderer, diagram, renderingOptions);
- ImageIO.write(image, "png", os);
+ SImageIO.write(image, "png", os);
final int width = image.getWidth();
final int height = image.getHeight();
return new ImageDataSimple(width, height);
diff --git a/src/net/sourceforge/plantuml/eggs/PSystemRIP.java b/src/net/sourceforge/plantuml/eggs/PSystemRIP.java
index 7fb25ffc9..1189d2cf0 100644
--- a/src/net/sourceforge/plantuml/eggs/PSystemRIP.java
+++ b/src/net/sourceforge/plantuml/eggs/PSystemRIP.java
@@ -41,7 +41,7 @@ import net.sourceforge.plantuml.PlainStringsDiagram;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.UmlSource;
import net.sourceforge.plantuml.graphic.GraphicPosition;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
public class PSystemRIP extends PlainStringsDiagram {
@@ -58,7 +58,7 @@ public class PSystemRIP extends PlainStringsDiagram {
strings.add(" Requiescat In Pace");
strings.add(" ");
- image = ImageIO.read(imm);
+ image = SImageIO.read(imm);
imagePosition = GraphicPosition.BOTTOM;
}
diff --git a/src/net/sourceforge/plantuml/fun/IconLoader.java b/src/net/sourceforge/plantuml/fun/IconLoader.java
index c70c426cb..1a757ec15 100644
--- a/src/net/sourceforge/plantuml/fun/IconLoader.java
+++ b/src/net/sourceforge/plantuml/fun/IconLoader.java
@@ -43,7 +43,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
public class IconLoader {
@@ -89,7 +89,7 @@ public class IconLoader {
if (is == null) {
return null;
}
- final BufferedImage image = ImageIO.read(is);
+ final BufferedImage image = SImageIO.read(is);
is.close();
return image;
} catch (IOException e) {
diff --git a/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java b/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java
index 44d4861a7..8cc6f31dd 100644
--- a/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java
+++ b/src/net/sourceforge/plantuml/jcckit/PSystemJcckit.java
@@ -50,7 +50,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.DiagramDescription;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.core.UmlSource;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
public class PSystemJcckit extends AbstractPSystem {
@@ -77,7 +77,7 @@ public class PSystemJcckit extends AbstractPSystem {
plotCanvas.paint();
// Writes the off-screen image into a PNG file
- ImageIO.write(image, "png", os);
+ SImageIO.write(image, "png", os);
return new ImageDataSimple(width, height);
}
diff --git a/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java b/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java
index e3b21b689..8a5a6e4ea 100644
--- a/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java
+++ b/src/net/sourceforge/plantuml/math/ScientificEquationSafe.java
@@ -52,7 +52,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
import net.sourceforge.plantuml.core.ImageData;
import net.sourceforge.plantuml.eps.EpsGraphics;
import net.sourceforge.plantuml.graphic.GraphicStrings;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
import net.sourceforge.plantuml.ugraphic.MutableImage;
@@ -118,7 +118,7 @@ public class ScientificEquationSafe {
}
try {
final byte[] bytes = plainPngBuilder(getRollback()).writeByteArray();
- return new PixelImage(ImageIO.read(bytes), AffineTransformType.TYPE_BILINEAR);
+ return new PixelImage(SImageIO.read(bytes), AffineTransformType.TYPE_BILINEAR);
} catch (IOException e1) {
return null;
}
@@ -140,7 +140,7 @@ public class ScientificEquationSafe {
Color backgroundColor) throws IOException {
if (fileFormat.getFileFormat() == FileFormat.PNG) {
final BufferedImage image = getImage(foregroundColor, backgroundColor).withScale(scale).getImage();
- ImageIO.write(image, "png", os);
+ SImageIO.write(image, "png", os);
return new ImageDataSimple(image.getWidth(), image.getHeight());
}
if (fileFormat.getFileFormat() == FileFormat.SVG) {
diff --git a/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java b/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java
index 9f5646f06..8bc29a01c 100644
--- a/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java
+++ b/src/net/sourceforge/plantuml/mjpeg/MJPEGGenerator.java
@@ -21,7 +21,7 @@ import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.Arrays;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
/**
@@ -455,7 +455,7 @@ public class MJPEGGenerator {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Graphics2D g = bi.createGraphics();
g.drawImage(image, 0, 0, width, height, null);
- ImageIO.write(bi, "jpg", baos);
+ SImageIO.write(bi, "jpg", baos);
baos.close();
bi = null;
g = null;
diff --git a/src/net/sourceforge/plantuml/png/Metadata.java b/src/net/sourceforge/plantuml/png/Metadata.java
index 057daee8d..19ca36a26 100644
--- a/src/net/sourceforge/plantuml/png/Metadata.java
+++ b/src/net/sourceforge/plantuml/png/Metadata.java
@@ -45,7 +45,7 @@ import javax.imageio.stream.ImageInputStream;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
public class Metadata {
@@ -59,8 +59,8 @@ public class Metadata {
}
public void readAndDisplayMetadata(SFile file) throws IOException {
- final ImageInputStream iis = ImageIO.createImageInputStream(file);
- final Iterator readers = ImageIO.getImageReaders(iis);
+ final ImageInputStream iis = SImageIO.createImageInputStream(file);
+ final Iterator readers = SImageIO.getImageReaders(iis);
if (readers.hasNext()) {
// pick the first available ImageReader
diff --git a/src/net/sourceforge/plantuml/png/MetadataTag.java b/src/net/sourceforge/plantuml/png/MetadataTag.java
index 7b25eba52..c5c114335 100644
--- a/src/net/sourceforge/plantuml/png/MetadataTag.java
+++ b/src/net/sourceforge/plantuml/png/MetadataTag.java
@@ -47,7 +47,7 @@ import javax.imageio.stream.ImageInputStream;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
public class MetadataTag {
@@ -71,8 +71,8 @@ public class MetadataTag {
}
public String getData() throws IOException {
- final ImageInputStream iis = ImageIO.createImageInputStream(source);
- final Iterator readers = ImageIO.getImageReaders(iis);
+ final ImageInputStream iis = SImageIO.createImageInputStream(source);
+ final Iterator readers = SImageIO.getImageReaders(iis);
if (readers.hasNext()) {
// pick the first available ImageReader
diff --git a/src/net/sourceforge/plantuml/png/PngIO.java b/src/net/sourceforge/plantuml/png/PngIO.java
index 8c34f1c6f..aba4d2098 100644
--- a/src/net/sourceforge/plantuml/png/PngIO.java
+++ b/src/net/sourceforge/plantuml/png/PngIO.java
@@ -40,7 +40,7 @@ import java.io.IOException;
import java.io.OutputStream;
import net.sourceforge.plantuml.Log;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
public class PngIO {
@@ -63,7 +63,7 @@ public class PngIO {
Log.debug("File size " + file.length());
if (file.length() == 0) {
Log.error("File size is zero: " + file);
- ImageIO.write(image, "png", file);
+ SImageIO.write(image, "png", file);
}
}
@@ -74,7 +74,7 @@ public class PngIO {
public static void write(RenderedImage image, OutputStream os, String metadata, int dpi, String debugData)
throws IOException {
if (metadata == null) {
- ImageIO.write(image, "png", os);
+ SImageIO.write(image, "png", os);
} else {
PngIOMetadata.writeWithMetadata(image, os, metadata, dpi, debugData);
}
diff --git a/src/net/sourceforge/plantuml/png/PngIOMetadata.java b/src/net/sourceforge/plantuml/png/PngIOMetadata.java
index 770096c52..c52fe9b8c 100644
--- a/src/net/sourceforge/plantuml/png/PngIOMetadata.java
+++ b/src/net/sourceforge/plantuml/png/PngIOMetadata.java
@@ -51,7 +51,7 @@ import javax.imageio.metadata.IIOMetadataNode;
import javax.imageio.stream.ImageOutputStream;
import net.sourceforge.plantuml.Log;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
public class PngIOMetadata {
@@ -100,7 +100,7 @@ public class PngIOMetadata {
// http://plantuml.sourceforge.net/qa/?qa=4367/sometimes-missing-response-headers-for-broken-png-images
// Code provided by Michael Griffel
synchronized (imagewriter) {
- final ImageOutputStream imageOutputStream = ImageIO.createImageOutputStream(os);
+ final ImageOutputStream imageOutputStream = SImageIO.createImageOutputStream(os);
imagewriter.setOutput(imageOutputStream);
try {
imagewriter.write(null /* default */, iioImage, null /* use default ImageWriteParam */);
@@ -170,8 +170,8 @@ public class PngIOMetadata {
}
private static ImageWriter getImageWriter() {
- final Iterator iterator = ImageIO.getImageWritersBySuffix("png");
- for (final Iterator it = ImageIO.getImageWritersBySuffix("png"); it.hasNext();) {
+ final Iterator iterator = SImageIO.getImageWritersBySuffix("png");
+ for (final Iterator it = SImageIO.getImageWritersBySuffix("png"); it.hasNext();) {
final ImageWriter imagewriter = iterator.next();
Log.debug("PngIOMetadata countImageWriter = " + it.next());
if (imagewriter.getClass().getName().equals("com.sun.imageio.plugins.png.PNGImageWriter")) {
@@ -181,7 +181,7 @@ public class PngIOMetadata {
}
Log.debug("Using first one");
- return ImageIO.getImageWritersBySuffix("png").next();
+ return SImageIO.getImageWritersBySuffix("png").next();
}
}
diff --git a/src/net/sourceforge/plantuml/png/PngSplitter.java b/src/net/sourceforge/plantuml/png/PngSplitter.java
index 4f928365b..85a1806dc 100644
--- a/src/net/sourceforge/plantuml/png/PngSplitter.java
+++ b/src/net/sourceforge/plantuml/png/PngSplitter.java
@@ -45,7 +45,7 @@ import java.util.List;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.SplitParam;
import net.sourceforge.plantuml.SuggestedFile;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
public class PngSplitter {
@@ -71,7 +71,7 @@ public class PngSplitter {
}
// Thread.yield();
- final BufferedImage im = ImageIO.read(full);
+ final BufferedImage im = SImageIO.read(full);
// Thread.yield();
final PngSegment horizontalSegment = new PngSegment(im.getWidth(), horizontalPages);
final PngSegment verticalSegment = new PngSegment(im.getHeight(), verticalPages);
diff --git a/src/net/sourceforge/plantuml/security/ImageIO.java b/src/net/sourceforge/plantuml/security/SImageIO.java
similarity index 99%
rename from src/net/sourceforge/plantuml/security/ImageIO.java
rename to src/net/sourceforge/plantuml/security/SImageIO.java
index 2f98131ca..506c36cfd 100644
--- a/src/net/sourceforge/plantuml/security/ImageIO.java
+++ b/src/net/sourceforge/plantuml/security/SImageIO.java
@@ -48,7 +48,7 @@ import javax.imageio.ImageWriter;
import javax.imageio.stream.ImageInputStream;
import javax.imageio.stream.ImageOutputStream;
-public class ImageIO {
+public class SImageIO {
public static ImageOutputStream createImageOutputStream(OutputStream os) throws IOException {
return javax.imageio.ImageIO.createImageOutputStream(os);
diff --git a/src/net/sourceforge/plantuml/sprite/SpriteImage.java b/src/net/sourceforge/plantuml/sprite/SpriteImage.java
index 64251b204..cc2c939c4 100644
--- a/src/net/sourceforge/plantuml/sprite/SpriteImage.java
+++ b/src/net/sourceforge/plantuml/sprite/SpriteImage.java
@@ -45,7 +45,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
import net.sourceforge.plantuml.ugraphic.PixelImage;
import net.sourceforge.plantuml.ugraphic.UGraphic;
@@ -87,7 +87,7 @@ public class SpriteImage implements Sprite {
return null;
}
try {
- return new SpriteImage(ImageIO.read(is));
+ return new SpriteImage(SImageIO.read(is));
} catch (IOException e) {
e.printStackTrace();
return null;
diff --git a/src/net/sourceforge/plantuml/svg/SvgGraphics.java b/src/net/sourceforge/plantuml/svg/SvgGraphics.java
index 129a162f3..bef26820a 100644
--- a/src/net/sourceforge/plantuml/svg/SvgGraphics.java
+++ b/src/net/sourceforge/plantuml/svg/SvgGraphics.java
@@ -69,7 +69,7 @@ import net.sourceforge.plantuml.FileUtils;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.SignatureUtils;
import net.sourceforge.plantuml.code.Base64Coder;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SecurityUtils;
import net.sourceforge.plantuml.tikz.TikzGraphics;
import net.sourceforge.plantuml.ugraphic.UGroupType;
@@ -848,7 +848,7 @@ public class SvgGraphics {
private String toBase64(BufferedImage image) throws IOException {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ImageIO.write(image, "png", baos);
+ SImageIO.write(image, "png", baos);
final byte data[] = baos.toByteArray();
return new String(Base64Coder.encode(data));
}
diff --git a/src/net/sourceforge/plantuml/swing/ImageWindow.java b/src/net/sourceforge/plantuml/swing/ImageWindow.java
index d9d5e1669..8e51d6654 100644
--- a/src/net/sourceforge/plantuml/swing/ImageWindow.java
+++ b/src/net/sourceforge/plantuml/swing/ImageWindow.java
@@ -71,7 +71,7 @@ import javax.swing.WindowConstants;
import net.sourceforge.plantuml.GeneratedImage;
import net.sourceforge.plantuml.ImageSelection;
import net.sourceforge.plantuml.graphic.GraphicStrings;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
import net.sourceforge.plantuml.version.PSystemVersion;
@@ -314,7 +314,7 @@ class ImageWindow extends JFrame {
final File png = generatedImage.getPngFile();
BufferedImage image = null;
try {
- image = ImageIO.read(new SFile(png.getAbsolutePath()));
+ image = SImageIO.read(new SFile(png.getAbsolutePath()));
if (sizeMode == SizeMode.ZOOM_FIT) {
final Dimension imageDim = new Dimension(image.getWidth(), image.getHeight());
final Dimension newImgDim = ImageHelper.getScaledDimension(imageDim,
@@ -335,7 +335,7 @@ class ImageWindow extends JFrame {
final TextBlockBackcolored error = GraphicStrings.createForError(Arrays.asList(msg), false);
try {
final byte[] bytes = plainPngBuilder(error).writeByteArray();
- image = ImageIO.read(bytes);
+ image = SImageIO.read(bytes);
} catch (IOException e) {
e.printStackTrace();
}
@@ -389,7 +389,7 @@ class ImageWindow extends JFrame {
}
try {
final File png = generatedImage.getPngFile();
- final Image image = ImageIO.read(png);
+ final Image image = SImageIO.read(png);
final ImageSelection imgSel = new ImageSelection(image);
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imgSel, null);
} catch (IOException e) {
diff --git a/src/net/sourceforge/plantuml/ugraphic/FontChecker.java b/src/net/sourceforge/plantuml/ugraphic/FontChecker.java
index 6f5afe759..498f8f6ba 100644
--- a/src/net/sourceforge/plantuml/ugraphic/FontChecker.java
+++ b/src/net/sourceforge/plantuml/ugraphic/FontChecker.java
@@ -56,7 +56,7 @@ import javax.xml.transform.TransformerException;
import net.sourceforge.plantuml.Dimension2DDouble;
import net.sourceforge.plantuml.graphic.FontConfiguration;
import net.sourceforge.plantuml.graphic.UDrawable;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.svg.LengthAdjust;
import net.sourceforge.plantuml.svg.SvgGraphics;
@@ -183,7 +183,7 @@ public class FontChecker {
}
};
final byte[] bytes = plainPngBuilder(drawable).writeByteArray();
- return ImageIO.read(bytes);
+ return SImageIO.read(bytes);
}
// public BufferedImage getBufferedImageOld(char c) throws IOException {
diff --git a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java
index 887a53818..15ed78804 100644
--- a/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java
+++ b/src/net/sourceforge/plantuml/ugraphic/ImageBuilder.java
@@ -80,7 +80,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.UDrawable;
import net.sourceforge.plantuml.mjpeg.MJPEGGenerator;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.skin.rose.Rose;
import net.sourceforge.plantuml.style.ClockwiseTopRightBottomLeft;
@@ -395,7 +395,7 @@ public class ImageBuilder {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeImageInternal(new FileFormatOption(FileFormat.PNG), baos, Animation.singleton(affineTransform));
baos.close();
- return ImageIO.read(baos.toByteArray());
+ return SImageIO.read(baos.toByteArray());
}
private UGraphic createUGraphic(FileFormatOption option, final Dimension2D dim, Animation animationArg, double dx,
diff --git a/src/net/sourceforge/plantuml/version/LicenseInfo.java b/src/net/sourceforge/plantuml/version/LicenseInfo.java
index 3762257b6..b41a9367c 100644
--- a/src/net/sourceforge/plantuml/version/LicenseInfo.java
+++ b/src/net/sourceforge/plantuml/version/LicenseInfo.java
@@ -49,7 +49,7 @@ import java.util.prefs.Preferences;
import net.sourceforge.plantuml.Log;
import net.sourceforge.plantuml.OptionFlags;
import net.sourceforge.plantuml.SignatureUtils;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
public class LicenseInfo {
@@ -154,7 +154,7 @@ public class LicenseInfo {
return null;
}
try {
- final BufferedImage result = ImageIO.read(dis);
+ final BufferedImage result = SImageIO.read(dis);
return result;
} finally {
dis.close();
diff --git a/src/net/sourceforge/plantuml/version/PSystemVersion.java b/src/net/sourceforge/plantuml/version/PSystemVersion.java
index 683f942e6..dae9fcd9e 100644
--- a/src/net/sourceforge/plantuml/version/PSystemVersion.java
+++ b/src/net/sourceforge/plantuml/version/PSystemVersion.java
@@ -53,7 +53,7 @@ import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
import net.sourceforge.plantuml.dedication.PSystemDedication;
import net.sourceforge.plantuml.preproc.Stdlib;
import net.sourceforge.plantuml.preproc2.PreprocessorUtils;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
import net.sourceforge.plantuml.security.SFile;
import net.sourceforge.plantuml.security.SecurityProfile;
import net.sourceforge.plantuml.security.SecurityUtils;
@@ -116,7 +116,7 @@ public class PSystemVersion extends PlainStringsDiagram {
private static BufferedImage getImage(final String name) {
try {
final InputStream is = PSystemVersion.class.getResourceAsStream(name);
- final BufferedImage image = ImageIO.read(is);
+ final BufferedImage image = SImageIO.read(is);
is.close();
return image;
} catch (IOException e) {
diff --git a/test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java b/test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java
index 74494d456..f1d3e9cfc 100644
--- a/test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java
+++ b/test/net/sourceforge/plantuml/test/PlantUmlTestUtils.java
@@ -14,7 +14,7 @@ import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.SourceStringReader;
import net.sourceforge.plantuml.core.Diagram;
import net.sourceforge.plantuml.error.PSystemError;
-import net.sourceforge.plantuml.security.ImageIO;
+import net.sourceforge.plantuml.security.SImageIO;
public class PlantUmlTestUtils {
@@ -51,7 +51,7 @@ public class PlantUmlTestUtils {
}
public BufferedImage asImage() throws IOException {
- return ImageIO.read(asByteArray(FileFormat.PNG));
+ return SImageIO.read(asByteArray(FileFormat.PNG));
}
public String asString() throws IOException {