<commit_before>/*
 * Copyright <NAME> 2011, All rights reserved.
 *
 */

package net.domesdaybook.reader;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 *
 * @author matt
 */
public class Utilities {
    

    
    public static byte[] getByteArray(String path) throws IOException {
        return getByteArray(new File(path));
    }
                
    
    public static byte[] getByteArray(File file) throws IOException {
        try {
            final Reader reader = new FileReader(file);
            final Window array = reader.getWindow(0);
            return array.getArray();
        } catch (FileNotFoundException ex) {
            return null;
        }
    }
    
    
}
<commit_msg>Refactored to just return IOException (or FileNotFoundException) in case of problems.<commit_after>/*
 * Copyright <NAME> 2011, All rights reserved.
 *
 */

package net.domesdaybook.reader;

import java.io.File;
import java.io.IOException;

/**
 *
 * @author matt
 */
public class Utilities {
    

    
    public static byte[] getByteArray(String path) throws IOException {
        return getByteArray(new File(path));
    }
                
    
    public static byte[] getByteArray(File file) throws IOException {
        final Reader reader = new FileReader(file);
        final Window window = reader.getWindow(0);
        return window.getArray();
    }
    
    
}

{'fraction_non_alphanumeric': 0.09661495063469676, 'fraction_numerical': 0.007052186177715092, 'mean_word_length': 2.362559241706161, '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': '7381326', 'n_tokens_mistral': 402, 'n_tokens_neox': 389, 'n_words': 110}