if (is != null) {
Reader br = new BufferedReader(new InputStreamReader(is));
YAMLFactory fact = new DefaultYAMLFactory();
Constructor ctor = fact.createConstructor(fact.createComposer(fact.createParser(fact.createScanner(br)),fact.createResolver()));
int i = 1;
while(ctor.checkData()) {
Object o = ctor.getData();
if (o instanceof Map<?, ?>) {
Map<String, ?> m = (Map<String, ?>) o;