* @throws IOException
*/
private void processRDataFile(File dataFile) throws IOException {
Closer closer = Closer.create();
InputStream in = closer.register(DatasetsBuilder.decompress(dataFile));
SEXP exp;
try {
RDataReader reader = new RDataReader(in);
exp = reader.readFile();
} catch(Throwable e) {
throw closer.rethrow(e);
} finally {
in.close();
}
if(!(exp instanceof PairList)) {
throw new UnsupportedOperationException("Expected to find a pairlist in " + dataFile + ", found a " + exp.getTypeName());
}
String logicalDatasetName = stripExtension(dataFile.getName());
Session session = new SessionBuilder().withoutBasePackage().build();
writePairList(logicalDatasetName, session, (PairList)exp);