public static Credential getServiceAccountCredential(String serviceAccountId,
      String privateKeyFile) throws GeneralSecurityException, IOException {
    return getServiceAccountCredential(serviceAccountId, privateKeyFile, DatastoreOptions.SCOPES);
  }
public static Credential getServiceAccountCredential ( String serviceAccountId , String privateKeyFile ) throws GeneralSecurityException , IOException { return getServiceAccountCredential ( serviceAccountId , privateKeyFile , DatastoreOptions . SCOPES ) ; }
Constructs credentials for the given account and key.

@param serviceAccountId service account ID (typically an e-mail address).
@param privateKeyFile the file name from which to get the private key.
@return valid credentials or {@code null}