public static @NotNull String decodeString(byte @NotNull [] bytes, final @NotNull Charset charset) {
    int bomLength = getBOMLength(bytes, charset);
    final CharBuffer charBuffer = charset.decode(ByteBuffer.wrap(bytes, bomLength, bytes.length - bomLength));
    return charBuffer.toString();
  }
public static @NotNull String decodeString(byte @NotNull [] bytes, final @NotNull Charset charset)