private static String getDelimiter(String message) { if ((Boolean) BlazarSettingsManager.getInstance().getSetting(BlazarSettingsImpl.FIX_USE_DELIMITER)) { return String.valueOf( BlazarSettingsManager.getInstance().getSetting(BlazarSettingsImpl.FIX_DELIMITER)); } String delimiter = resolveDelimiter(message); if (delimiter == null) { return String.valueOf( BlazarSettingsManager.getInstance().getSetting(BlazarSettingsImpl.FIX_DELIMITER)); } return delimiter; }
private static String resolveDelimiter(String message) { int index = message.indexOf( "9" + BlazarSettingsManager.getInstance() .getSetting(BlazarSettingsImpl.FIX_VALUE_DELIMITER)); if (index > 0) { return String.valueOf(message.charAt(index - 1)); } return null; }