calling java base64 constructor with arguments
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Markus Leuthold
il 21 Ott 2015
Commentato: Markus Leuthold
il 22 Ott 2015
I want to convert a character array into a Base64 stream using java.
The class
org.apache.commons.codec.binary.Base64
does a good job for this purpose. However, I need to provide parameters for the constructor. None of the following works for changing the line length
org.apache.commons.codec.binary.Base64(java.lang.Integer(80))
org.apache.commons.codec.binary.Base64(80)
javaObject('org.apache.commons.codec.binary.Base64',java.lang.Integer(80))
javaObject('org.apache.commons.codec.binary.Base64',80)
All of them return
No constructor 'org.apache.commons.codec.binary.Base64' with matching signature found.
According to https://commons.apache.org/proper/commons-codec/apidocs/org/apache/commons/codec/binary/Base64.html my constructors should work
Any ideas?
0 Commenti
Risposta accettata
Guillaume
il 21 Ott 2015
If you look at the list of methods available for that java class with
methodsview org.apache.commons.codec.binary.Base64
%or
methods org.apache.commons.codec.binary.Base64 -full
you'll see that only the constructor with no input is listed and a fair number of methods are missing. The additional constructors and all those mising methods are all listed as having been introduced in version 1.4 of the library (look in the details of the documentation of each method).
Therefore, it's safe to assume that matlab ships with a version earlier than 1.4. You're out of luck with this one. I'm not sure you can safely replace the jvm that ships with matlab but you can always import a different library. I'm sure that there's more than one that does Base64 decoding.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Call Java from MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!