public Map<String,Map<String,String>> getTagsAndAttributesFromIndexPage(BrowsableNode browsableNode, Locale locale, String version, UrlContentAccessor contentAccessor, RequestMode requestMode) throws ContentProcessingException, ResourceNotFoundException {
File indexPage = getIndexPage(browsableNode);
try {
if ( !Arrays.asList(app.appConf().getLocales()).contains(locale) ) {
throw new ResourceNotFoundException("The locale '"+locale+"' is not a valid locale for this app.");
}
String pathRelativeToApp = RelativePathUtility.get(app.root().getFileInfoAccessor(), app.dir(), indexPage);
ByteArrayOutputStream indexPageContent = new ByteArrayOutputStream();
contentAccessor.writeLocalUrlContentsToOutputStream(pathRelativeToApp, indexPageContent);