class JSONFileReader implements Closeable {

    public T getNext() throws IOException {
        if (readingAsStream) {
            JsonToken token = parser.nextToken();
            if (token == JsonToken.END_ARRAY || token == null) {
                return null;
            }

            return JSONMapper.Mapper.readValue(parser, dataClass);
        } else {
            throw new IllegalStateException("Must have called startStream before calling getNext.");
        }
    }

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

}