private Object[] readClosedList() throws IOException {
        ArrayList objects = new ArrayList();
        while (true) {
            int code = readNextCode();
            if (code == Codes.END_COLLECTION) {
                return objects.toArray();
            }
            objects.add(read(code));
        }
    }