Here you can find the source of getBytes(String fileName)
private static byte[] getBytes(String fileName) throws IOException
//package com.java2s; //License from project: Open Source License import java.io.File; import java.io.FileInputStream; import java.io.IOException; public class Main { private static byte[] getBytes(String fileName) throws IOException { File file = new File("src/test/resources/crc_test_files/" + fileName); FileInputStream fin = new FileInputStream(file); byte fileContent[] = new byte[(int) file.length()]; fin.read(fileContent);// w w w . ja va2 s .c om return fileContent; } }