<commit_before>package org.meteogroup.grib_library.grib1;

import org.meteogroup.grib_library.exception.BinaryNumberConversionException;
import org.meteogroup.grib_library.exception.GribReaderException;
import org.meteogroup.grib_library.grib1.model.Grib1Record;
import org.meteogroup.grib_library.util.FileChannelPartReader;

import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by roijen on 20-Oct-15.
 */
public class Grib1CollectionReaderService {

    //TODO FIX MEMBER VARIABLE!!

    public Grib1RecordReaderService recordReader;
    public FileChannelPartReader partReader;

    public long gribRecordOffset = -1;
    public long fileLength = -1;
    public FileChannel fc = null;

    private static final int HEADER_LENGTH = 8;

    public List<Grib1Record> readFileFromFileName(String url) throws IOException, BinaryNumberConversionException, GribReaderException {
        this.fc = this.getFileChannelFromURL(url);<commit_msg>Refactor (part II...)<commit_after>package org.meteogroup.grib_library.grib1;

import org.meteogroup.grib_library.exception.BinaryNumberConversionException;
import org.meteogroup.grib_library.exception.GribReaderException;
import org.meteogroup.grib_library.grib1.model.Grib1Record;
import org.meteogroup.grib_library.util.FileChannelPartReader;

import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by roijen on 20-Oct-15.
 */
public class Grib1CollectionReaderService {
    
    Grib1RecordReaderService recordReader;
    FileChannelPartReader partReader;

    long gribRecordOffset = -1;
    long fileLength = -1;
    FileChannel fc = null;

    private static final int HEADER_LENGTH = 8;

    public List<Grib1Record> readFileFromFileName(String url) throws IOException, BinaryNumberConversionException, GribReaderException {
        this.fc = this.getFileChannelFromURL(url);
{'fraction_non_alphanumeric': 0.08166259168704157, 'fraction_numerical': 0.012713936430317848, 'mean_word_length': 5.237804878048781, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4827245', 'n_tokens_mistral': 643, 'n_tokens_neox': 624, 'n_words': 124}