I used both javax.xml.bind.DatatypeConverter and sun.misc.BASE64Decoder. But when i give nonBase 64 strings i get no exceptions with BASE64Decoder
so
public static void main(String[] args) throws IOException{
BASE64Decoder decoder = new BASE64Decoder();
decoder.decodeBuffer("Asdghäö'¨öä'");
}
This throws no exceptions
and this,
DatatypeConverter.parseBase64Binary("ÖSaAA&&%¤");
Throws IndexOutOfBounds
but
DatatypeConverter.parseBase64Binary("ASDGW&&");
doesn't give anything at all where i expect an IllegalArgumentException as it stated here
Does anyone encountered this before? and what do you suggest?
Thanks