Get clipboard entry content as string text. If data cannot be converted to the string, this function throws exception. @return clipboard data converted to the string
()
| 75 | * @return clipboard data converted to the string |
| 76 | */ |
| 77 | @NotNull @SneakyThrows |
| 78 | public String getString() { |
| 79 | if (Platform.CURRENT == Platform.X11 || Platform.CURRENT == Platform.MACOS) { |
| 80 | return new String(_data, "UTF-8"); |
| 81 | } |
| 82 | return new String(_data, "UTF-16LE"); |
| 83 | } |
| 84 | } |