Changeset 8149 in josm for trunk/src/com/kitfox/svg
- Timestamp:
- 2015-03-22T23:16:08+01:00 (10 years ago)
- Location:
- trunk/src/com/kitfox/svg
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/kitfox/svg/SVGUniverse.java
r8084 r8149 62 62 import java.util.zip.GZIPInputStream; 63 63 import javax.imageio.ImageIO; 64 import javax.xml.bind.DatatypeConverter; 64 65 import org.xml.sax.EntityResolver; 65 66 import org.xml.sax.InputSource; … … 191 192 if (content.startsWith("base64")) 192 193 { 193 content = content.substring(6);194 194 try 195 195 { 196 byte[] buf = new sun.misc.BASE64Decoder().decodeBuffer(content);196 byte[] buf = DatatypeConverter.parseBase64Binary(content.substring(6)); 197 197 ByteArrayInputStream bais = new ByteArrayInputStream(buf); 198 198 BufferedImage img = ImageIO.read(bais); … … 214 214 215 215 return url; 216 } catch (IOException ex) 216 } 217 catch (IOException | IllegalArgumentException ex) 217 218 { 218 219 Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, -
trunk/src/com/kitfox/svg/app/data/Handler.java
r8084 r8149 45 45 import java.util.logging.Logger; 46 46 47 import javax.xml.bind.DatatypeConverter; 48 47 49 /** 48 50 * … … 67 69 if (content.startsWith("base64,")) 68 70 { 69 content = content.substring(7);70 71 try 71 72 { 72 buf = new sun.misc.BASE64Decoder().decodeBuffer(content);73 buf = DatatypeConverter.parseBase64Binary(content.substring(7)); 73 74 } 74 catch (I OException e)75 catch (IllegalArgumentException e) 75 76 { 76 77 Logger.getLogger(SVGConst.SVG_LOGGER).log(Level.WARNING, null, e);
Note:
See TracChangeset
for help on using the changeset viewer.