From 4ca7853c30a8de443a12369a0b84a7173cf308a6 Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Fri, 11 Mar 2016 10:36:58 +0100 Subject: [PATCH] Use base64 parser from javax.xml.bind.DatatypeConverter. --- src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java index 81963c6..a1e7596 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/votable/controller/VOTableDataParser.java @@ -19,11 +19,12 @@ package eu.omp.irap.vespa.epntapclient.votable.controller; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; -import java.util.Base64; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.xml.bind.DatatypeConverter; + import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -187,7 +188,7 @@ public class VOTableDataParser { logger.info("Parsing data in BINARY stream..."); String strStream = voStream.getValue().replaceAll("(\\r|\\n)", ""); - stream = ByteBuffer.wrap(Base64.getDecoder().decode(strStream)); + stream = ByteBuffer.wrap(DatatypeConverter.parseBase64Binary(strStream)); Object[] row = new Object[columnsName.length]; int nValue = 0; -- libgit2 0.21.2