@param cls The native interface type @return The preferred string encoding for the given native interface. If there is no setting, defaults to the #getDefaultStringEncoding(). @see com.sun.jna.Library#OPTION_STRING_ENCODING
(Class<?> cls)
| 901 | * @see com.sun.jna.Library#OPTION_STRING_ENCODING |
| 902 | */ |
| 903 | public static String getStringEncoding(Class<?> cls) { |
| 904 | Map<String, ?> options = getLibraryOptions(cls); |
| 905 | String encoding = (String) options.get(Library.OPTION_STRING_ENCODING); |
| 906 | return encoding != null ? encoding : getDefaultStringEncoding(); |
| 907 | } |
| 908 | |
| 909 | /** |
| 910 | * @return The default string encoding. Returns the value of the system |