public static long[] readLongArray(final File f) throws IOException {
  final byte[] b=new byte[(int)f.length()];
  try (InputStream stream=new FileInputStream(f)){
    final int length=stream.read(b);
    if (length != b.length) {
      throw new IOException();
    }
  }
   return ByteArrayIOUtils.convertToLongArray(b);
}

public static long [ ] readLongArray ( final File f ) throws IOException { final byte [ ] b = new byte [ ( int ) f . length ( ) ] ; try ( InputStream stream = new FileInputStream ( f ) ) { final int length = stream . read ( b ) ; if ( length != b . length ) { throw new IOException ( ) ; } } return ByteArrayIOUtils . convertToLongArray ( b ) ; }
read an array of longs from a file .
