code: private static String[] readSqlStatements(URL url) {
          try {
              char buffer[] = new char[256];
              StringBuilder result = new StringBuilder();
              InputStreamReader reader = new InputStreamReader(url.openStream(), "UTF-8");
              while (true) {
                  int count = reader.read(buffer);
                  if (count < 0) {
                      break;
                  }
                  result.append(buffer, 0, count);
              }
              return result.toString().split(";");
          } catch (IOException ex) {
              throw new RuntimeException("Cannot read " + url, ex);
          }
      }
docs: Reads SQL statements from file. SQL commands in file must be separated by
  a semicolon.
  
  @param url url of the file
  @return array of command  strings