} else if(o instanceof Object[]) { oc.write(TYPE_ARRAY, listName + "t" + counter, 0); this.writeList(oc, Arrays.asList((Object[]) o), listName + "v" + counter); } else if(o instanceof List) { oc.write(TYPE_LIST, listName + "t" + counter, 0); this.writeList(oc, (List<?>) o, listName + "v" + counter); } else if(o instanceof Map) { oc.write(TYPE_MAP, listName + "t" + counter, 0); Map<?, ?> map = (Map<?, ?>) o; this.writeList(oc, map.keySet(), listName + "v(keys)" + counter); this.writeList(oc, map.values(), listName + "v(vals)" + counter); } else { throw new UnsupportedOperationException("Unsupported type stored in the list: " + o.getClass());
} else if(o instanceof Object[]) { oc.write(TYPE_ARRAY, listName + "t" + counter, 0); this.writeList(oc, Arrays.asList((Object[]) o), listName + "v" + counter); } else if(o instanceof List) { oc.write(TYPE_LIST, listName + "t" + counter, 0); this.writeList(oc, (List<?>) o, listName + "v" + counter); } else if(o instanceof Map) { oc.write(TYPE_MAP, listName + "t" + counter, 0); Map<?, ?> map = (Map<?, ?>) o; this.writeList(oc, map.keySet(), listName + "v(keys)" + counter); this.writeList(oc, map.values(), listName + "v(vals)" + counter); } else { throw new UnsupportedOperationException("Unsupported type stored in the list: " + o.getClass());