try {
PrintWriter fileWriter = new PrintWriter(new FileOutputStream(multiObjectFile));
fileWriter.println("{\"name\":\"Bob\",\"age\":27}[7,16,0 -4]");
fileWriter.flush();
JSONInputStream jsonIn = new JSONInputStream(new FileInputStream(multiObjectFile));
/*
* Read the first object from the file
*/
Object aPossibleMap = jsonIn.readObject();
assertEquals(HashMap.class, aPossibleMap.getClass());
HashMap aMap = (HashMap)aPossibleMap;
assertEquals("Bob", aMap.get("name"));
assertEquals((long)27, aMap.get("age"));
/*
* Test if a second entry be read correctly?
*/
Object aPossibleArrayList = jsonIn.readObject();
assertEquals(ArrayList.class, aPossibleArrayList.getClass());
ArrayList anArrayList = (ArrayList)aPossibleArrayList;
} catch (Exception e) {