public static void main(String[] args) throws IOException {
  List<Byte> binBook=createBinBook();
  FileOutputStream out=new FileOutputStream("../src/book.bin");
  int bookLen=binBook.size();
  byte[] binBookA=new byte[bookLen];
  for (int i=0; i < bookLen; i++)   binBookA[i]=binBook.get(i);
  out.write(binBookA);
  out.close();
}

public static void main ( String [ ] args ) throws IOException { List < Byte > binBook = createBinBook ( ) ; FileOutputStream out = new FileOutputStream ( "../src/book.bin" ) ; int bookLen = binBook . size ( ) ; byte [ ] binBookA = new byte [ bookLen ] ; for ( int i = 0 ; i < bookLen ; i ++ ) binBookA [ i ] = binBook . get ( i ) ; out . write ( binBookA ) ; out . close ( ) ; }
creates the book . bin file .
