docs: @Nullable
      static Charset guessCharSet(@NotNull final byte[] bytes)
      {
          String[] encodings = { UTF_8, System.getProperty("file.encoding"), ISO_8859_1 };
  
          for (String encoding : encodings)
          {
              Charset charset = Charset.forName(encoding);
              CharsetDecoder cs = charset.newDecoder();
  
              try {
                  cs.decode(ByteBuffer.wrap(bytes));
                  return charset;
              } catch (CharacterCodingException e) {
                  // fall through...
              }
          }
  
          // No encodings succeeded. Return null.
          return null;
      }