container/src/main/java/com/streamsets/datacollector/cli/sch/SchAdmin.java
private static void updateTokenFile(Context context, String appAuthToken) throws IOException {
    File tokenFile = context.tokenFilePath == null ? new File(context.runtimeInfo.getConfigDir(), APP_TOKEN_FILE) : new File(context.tokenFilePath);
    DataStore dataStore = new DataStore(tokenFile);
    try (OutputStream os = dataStore.getOutputStream()) {
      IOUtils.write(appAuthToken, os);
      dataStore.commit(os);
    } finally {
      dataStore.release();
    }
  }
private static void updateTokenFile(Context context, String appAuthToken) throws IOException {
    File tokenFile = context.tokenFilePath == null ? new File(context.runtimeInfo.getConfigDir(), APP_TOKEN_FILE) : new File(context.tokenFilePath);
    DataStore dataStore = new DataStore(tokenFile);
    try (OutputStream os = dataStore.getOutputStream()) {
      IOUtils.write(appAuthToken, os);
      dataStore.commit(os);
    } finally {
      dataStore.release();
    }
  }
private static void updateTokenFile ( Context context , String appAuthToken ) throws IOException { File tokenFile = context . tokenFilePath == null ? new File ( context . runtimeInfo . getConfigDir ( ) , APP_TOKEN_FILE ) : new File ( context . tokenFilePath ) ; DataStore dataStore = new DataStore ( tokenFile ) ; try ( OutputStream os = dataStore . getOutputStream ( ) ) { IOUtils . write ( appAuthToken , os ) ; dataStore . commit ( os ) ; } finally { dataStore . release ( ) ; } }
Update token file with the SDC access token.
Update token file with the SDC access token .