class JSONFileReader implements Closeable {

    public List<T> getAll() throws IOException {
        if (readingAsStream) {
            throw new IllegalStateException("Cannot use getAll after started reading as stream.");
        } else {
            CollectionType type = JSONMapper.Mapper.getTypeFactory().constructCollectionType(List.class, dataClass);
            return JSONMapper.Mapper.readValue(parser, type);
        }
    }

    public  JSONFileReader(File file, Class<T> dataClass);

}