bytes = docString.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
EclipseCommonPlugin.handleError(ABPlugin.getDefault(), e);
}
final ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
final JiBXReader reader;
try {
reader = new JiBXReader(Class.forName(
"com.volantis.mcs.policies.impl.variants.layout.LayoutContentBuilderImpl"));
} catch (ClassNotFoundException e) {
throw new ExtendedIOException(e);
}
final BinaryContentInput content = new BinaryContentInput(inputStream);
ContentBuilder contentBuilder = null;
try {
contentBuilder =
(ContentBuilder) reader.read(content, file.getName());
} catch (ArrayIndexOutOfBoundsException e) {
// HACK : This can happen if we are in the process of removing
// a grid column. First the grid column count is updated then
// the columns are removed. But a change event and layout
// validation is triggered when the column count is altered. As