new ByteArrayInputStream(getMap.getSldBody().getBytes()), errors));
}
}
InputStream input = new ByteArrayInputStream(getMap.getSldBody().getBytes());
StyledLayerDescriptor sld = parseSld(getMap, input);
processSld(getMap, requestedLayerInfos, sld, styleNameList);
// set filter in, we'll check consistency later
getMap.setFilter(filters);
} else if (getMap.getSld() != null) {
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.fine("Getting layers and styles from reomte SLD");
}
URL sldUrl = getMap.getSld();
if (getMap.getValidateSchema().booleanValue()) {
InputStream input = Requests.getInputStream(sldUrl);
List errors = null;
try {
errors = validateSld(input, getMap);
} finally {
input.close();
}
if ((errors != null) && (errors.size() != 0)) {
input = Requests.getInputStream(sldUrl);
try {
throw new ServiceException(SLDValidator.getErrorMessage(input, errors));
} finally {
input.close();
}
}
}
// JD: GEOS-420, Wrap the sldUrl in getINputStream method in order
// to do compression
InputStream input = Requests.getInputStream(sldUrl);
try {
StyledLayerDescriptor sld = parseSld(getMap, input);
processSld(getMap, requestedLayerInfos, sld, styleNameList);
} finally {
input.close();
}