if (encoding != null) {
if ("base64".equals(encoding)) {
String input = inputData.toString();
decoded = Base64.decode(input);
} else {
throw new WPSException("Unsupported encoding " + encoding);
}
}
if(decoded != null) {
return new ByteArrayRawData(decoded, complex.getMimeType());
} else {
return new StringRawData(inputData.toString(), complex.getMimeType());
}
} else {
Object inputData = complex.getData().get(0);
String encoding = complex.getEncoding();
byte[] decoded = null;
if (encoding != null) {
if ("base64".equals(encoding)) {
String input = inputData.toString();
decoded = Base64.decode(input);
} else {
throw new WPSException("Unsupported encoding " + encoding);
}
}
if (decoded != null) {
value = ((ComplexPPIO) ppio).decode(new ByteArrayInputStream(decoded));