public static IByteSequence readBytesFromFile(File file) throws IOException {
  long fileLength=file.length();
  if (fileLength > Integer.MAX_VALUE)   throw new IOException("File is too large, size is bigger than " + Integer.MAX_VALUE);
  return StreamUtil.readAllBytesFromStream(new FileInputStream(file),(int)fileLength);
}

public static IByteSequence readBytesFromFile ( File file ) throws IOException { long fileLength = file . length ( ) ; if ( fileLength > Integer . MAX_VALUE ) throw new IOException ( "File is too large, size is bigger than " + Integer . MAX_VALUE ) ; return StreamUtil . readAllBytesFromStream ( new FileInputStream ( file ) , ( int ) fileLength ) ; }
read all bytes of the given file .
