write/read two byte arrays to one file- help!
i'm doing a java program, and i have to store two byte arrays to one file and read them back in another class, how can i do that? i know how to do it with one array using FileInputStream, the code as below:
File file = new File(KeyFilename);
FileInputStream fis=new FileInputStream(file);
byte enckeyarray=new byte[(int) file.length()];
but how can i store two byte arrays in one file and read them back??