Changeset 10746 in josm for trunk/src/com/kitfox


Ignore:
Timestamp:
2016-08-06T16:52:01+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390, see #11924 - replace javax.xml.bind.DatatypeConverter (not visible by default in Java 9) by java.util.Base64 (new in Java 8)

Location:
trunk/src/com/kitfox/svg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/com/kitfox/svg/SVGUniverse.java

    r10741 r10746  
    5656import java.net.URL;
    5757import java.util.ArrayList;
     58import java.util.Base64;
    5859import java.util.HashMap;
    5960import java.util.Iterator;
     
    6263import java.util.zip.GZIPInputStream;
    6364import javax.imageio.ImageIO;
    64 import javax.xml.bind.DatatypeConverter;
    6565import javax.xml.parsers.ParserConfigurationException;
    6666import javax.xml.parsers.SAXParserFactory;
     
    195195                try
    196196                {
    197                     byte[] buf = DatatypeConverter.parseBase64Binary(content.substring(6));
     197                    byte[] buf = Base64.getDecoder().decode(content.substring(6));
    198198                    ByteArrayInputStream bais = new ByteArrayInputStream(buf);
    199199                    BufferedImage img = ImageIO.read(bais);
  • trunk/src/com/kitfox/svg/app/data/Handler.java

    r8149 r10746  
    4242import java.net.URLConnection;
    4343import java.net.URLStreamHandler;
     44import java.util.Base64;
    4445import java.util.logging.Level;
    4546import java.util.logging.Logger;
    46 
    47 import javax.xml.bind.DatatypeConverter;
    4847
    4948/**
     
    7170                try
    7271                {
    73                     buf = DatatypeConverter.parseBase64Binary(content.substring(7));
     72                    buf = Base64.getDecoder().decode(content.substring(7));
    7473                }
    7574                catch (IllegalArgumentException e)
Note: See TracChangeset for help on using the changeset viewer.