Loading buildUWS.xml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ <!DOCTYPE project> <project name="uws" basedir="." default="buildLib"> <property name="version" value="4.1" /> <property name="version" value="4.2" /> <property name="srcDir" value="src" /> <property name="libDir" value="lib" /> Loading src/uws/UWSToolBox.java +16 −3 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.lang.reflect.Array; import java.net.MalformedURLException; import java.net.URL; import java.net.URLDecoder; Loading Loading @@ -54,7 +55,7 @@ import uws.service.request.UploadFile; * Some useful functions for the managing of a UWS service. * * @author Grégory Mantelet (CDS;ARI) * @version 4.1 (04/2015) * @version 4.2 (07/2015) */ public class UWSToolBox { Loading Loading @@ -148,9 +149,21 @@ public class UWSToolBox { // Transform the map of Objects into a map of Strings: for(Map.Entry<String,Object> e : params.entrySet()){ if (e.getValue() != null) if (e.getValue() != null){ if (e.getValue().getClass().isArray()){ StringBuffer str = new StringBuffer(); Object array = e.getValue(); int length = Array.getLength(array); for(int i = 0; i < length; i++){ if (i > 0) str.append(';'); str.append(Array.get(array, i)); } map.put(e.getKey(), str.toString()); }else map.put(e.getKey(), e.getValue().toString()); } } // Return the fetched map: return map; Loading Loading
buildUWS.xml +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ <!DOCTYPE project> <project name="uws" basedir="." default="buildLib"> <property name="version" value="4.1" /> <property name="version" value="4.2" /> <property name="srcDir" value="src" /> <property name="libDir" value="lib" /> Loading
src/uws/UWSToolBox.java +16 −3 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.lang.reflect.Array; import java.net.MalformedURLException; import java.net.URL; import java.net.URLDecoder; Loading Loading @@ -54,7 +55,7 @@ import uws.service.request.UploadFile; * Some useful functions for the managing of a UWS service. * * @author Grégory Mantelet (CDS;ARI) * @version 4.1 (04/2015) * @version 4.2 (07/2015) */ public class UWSToolBox { Loading Loading @@ -148,9 +149,21 @@ public class UWSToolBox { // Transform the map of Objects into a map of Strings: for(Map.Entry<String,Object> e : params.entrySet()){ if (e.getValue() != null) if (e.getValue() != null){ if (e.getValue().getClass().isArray()){ StringBuffer str = new StringBuffer(); Object array = e.getValue(); int length = Array.getLength(array); for(int i = 0; i < length; i++){ if (i > 0) str.append(';'); str.append(Array.get(array, i)); } map.put(e.getKey(), str.toString()); }else map.put(e.getKey(), e.getValue().toString()); } } // Return the fetched map: return map; Loading