
ingenias.generator.util.FileUtils Maven / Gradle / Ivy
package ingenias.generator.util;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Vector;
public class FileUtils {
public static byte[] readFileAsBytes(String filename)
throws FileNotFoundException, IOException {
FileInputStream fis=new FileInputStream(filename);
Vector sb=new Vector();
int read=0;
while (read!=-1){
read=fis.read();
if (read!=-1)
sb.add((byte)read);
}
fis.close();
byte[] array=new byte[sb.size()];
for (int k=0;k
© 2015 - 2025 Weber Informatics LLC | Privacy Policy