I need to read a key value pair (Stored in Excel) in one of the OSGi service.
I am thinking of three approaches:
- Store the Excel under Resources for Osgi bundle , and read the Excel using :
File file = File.createTempFile("test",".xls");
contentStream=class.getClassLoader().getResourceAsStream("TextExcel");
outputStream = new FileOutputStream(file);
IOUtils.copy(contentStream, outputStream);
And then Parse the Excel to get the Value
2 Similar approach like 1 but store it as XML and Parse it
3 Convert these Key Value Pairs (Excel) in to JCR Node Structure (It will be about 150 nodes) and then parse the node.
I feel option 1, 2 can consume relatively less number of operations than traversing the JCR nodes.
What should be the right approach for this?