use of org.jetbrains.android.util.ValueResourcesFileParser in project android by JetBrains.
the class AndroidBuildDataCache method parseValueResourceFile.
@NotNull
private static List<ResourceEntry> parseValueResourceFile(@NotNull File valueResXmlFile) throws IOException {
final ArrayList<ResourceEntry> result = new ArrayList<ResourceEntry>();
final InputStream inputStream = new BufferedInputStream(new FileInputStream(valueResXmlFile));
try {
FormsParsing.parse(inputStream, new ValueResourcesFileParser() {
@Override
protected void stop() {
throw new FormsParsing.ParserStoppedException();
}
@Override
protected void process(@NotNull ResourceEntry resourceEntry) {
result.add(resourceEntry);
}
});
} finally {
inputStream.close();
}
return result;
}
Aggregations