package bdf.util; import java.io.FileInputStream; import java.io.IOException; public class FileHelpers { public static byte[] readAll(FileInputStream in) { try { // Get bytes to return int available = in.available(); byte[] bytes = new byte[available]; // Loop over the available bytes for(int i=0;i