Groovy 如何将Base64字符串解码为png/jpg

Groovy 如何将Base64字符串解码为png/jpg,groovy,soapui,Groovy,Soapui,[没有方法的签名:java.util.Base64.decode()适用于 参数类型错误 这与“SOAP”有什么关系?有关base64解码,请参见(因此其。base64.decoder.decode(…)此错误字符串看起来不完整,请提供完整信息? def prop = testRunner.testCase.getTestStepByName("Kundendaten").getPropertyValue("phototandata") //log.inf

[没有方法的签名:java.util.Base64.decode()适用于 参数类型错误


这与“SOAP”有什么关系?有关base64解码,请参见(因此其。
base64.decoder.decode(…)
此错误字符串看起来不完整,请提供完整信息?
def prop = testRunner.testCase.getTestStepByName("Kundendaten").getPropertyValue("phototandata")
//log.info( "Photo TAN property value= "+prop)

Base64 decoder = new Base64();
byte[] imgBytes = decoder.decode(prop);
FileOutputStream osf = new FileOutputStream(new File("B:\\Transfer\\haoot\\bild"));
osf.write(imgBytes);
osf.flush();
Base64 decoder = new Base64();
byte[] imgBytes = decoder.getDecoder().decode(prop);