public static void writeDynamicConfig(String dynamicConfigFilename, String configFileStr,
final boolean configBackwardCompatibilityMode, final QuorumVerifier qv,
final boolean needEraseStaticClientInfo) throws IOException {
final String actualDynamicConfigFilename = dynamicConfigFilename;
new AtomicFileWritingIdiom(new File(actualDynamicConfigFilename), new OutputStreamStatement() {
@Override
public void write(OutputStream outConfig) throws IOException {
byte b[] = qv.toString().getBytes();
outConfig.write(b);
}