final ResourceKey baseKey =
DocumentContextUtility.getBaseResource
(layoutProcess.getDocumentContext());
final ResourceManager manager = layoutProcess.getResourceManager();
final ResourceKey key = manager.createKey(bytes);
final Resource resource = manager.create(key, baseKey, StyleRule.class);
final CSSDeclarationRule rule =
(CSSDeclarationRule) resource.getResource();
if (rule != null)
{