diff --git a/build.gradle b/build.gradle index b5b8b91..2e0e849 100644 --- a/build.gradle +++ b/build.gradle @@ -35,10 +35,6 @@ dependencies { implementation "org.geotools:gt-api:${geotoolsVersion}" // implementation "org.geotools:gt-geometry:${geotoolsVersion}" implementation "org.geotools:gt-referencing:${geotoolsVersion}" - - implementation 'javax.xml.bind:jaxb-api:2.3.1' - implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1' - implementation 'com.sun.xml.bind:jaxb-impl:2.3.9' testImplementation 'junit:junit:4.13.2' diff --git a/src/json/tools/Compress.java b/src/json/tools/Compress.java index 2772808..fab9812 100644 --- a/src/json/tools/Compress.java +++ b/src/json/tools/Compress.java @@ -2,10 +2,7 @@ import java.nio.charset.StandardCharsets; -import javax.xml.bind.DatatypeConverter; - import net.jpountz.lz4.LZ4Compressor; -import net.jpountz.lz4.LZ4Decompressor; import net.jpountz.lz4.LZ4Factory; import net.jpountz.lz4.LZ4UnknownSizeDecompressor; @@ -25,14 +22,14 @@ public static String compressB64(String iStr){ byte[] compressedFinal = new byte[compressedLength]; System.arraycopy(compressed, 0, compressedFinal, 0, compressedLength); - return DatatypeConverter.printBase64Binary(compressedFinal); + return java.util.Base64.getEncoder().encodeToString(compressedFinal); } public static String decompressB64(String iStr){ - byte[] aInputData = DatatypeConverter.parseBase64Binary(iStr); + byte[] aInputData = java.util.Base64.getDecoder().decode(iStr); LZ4Factory factory = LZ4Factory.fastestInstance(); diff --git a/src/json/topojson/api/TopojsonApi.java b/src/json/topojson/api/TopojsonApi.java index a6cf55c..c23cc5f 100644 --- a/src/json/topojson/api/TopojsonApi.java +++ b/src/json/topojson/api/TopojsonApi.java @@ -1,24 +1,15 @@ package json.topojson.api; -import java.io.File; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.util.List; import java.util.TreeSet; -import javax.xml.bind.DatatypeConverter; - -import net.jpountz.lz4.LZ4Compressor; -import net.jpountz.lz4.LZ4Factory; - import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import json.converter.csv.merger.Merger; import json.converter.shp.ShpFileReader; import json.geojson.FeatureCollection; -import json.geojson.objects.Bounding; import json.tools.Compress; import json.tools.Toolbox; import json.topojson.algorithm.ArcMap;