code: public static boolean isEncrypted(ByteBuf buffer) {
          if (buffer.readableBytes() < SslUtils.SSL_RECORD_HEADER_LENGTH) {
              throw new IllegalArgumentException(
                      "buffer must have at least " + SslUtils.SSL_RECORD_HEADER_LENGTH + " readable bytes");
          }
          return getEncryptedPacketLength(buffer, buffer.readerIndex()) != SslUtils.NOT_ENCRYPTED;
      }
docs: Returns {@code true} if the given {@link ByteBuf} is encrypted. Be aware that this method
  will not increase the readerIndex of the given {@link ByteBuf}.
  
  @param   buffer
  The {@link ByteBuf} to read from. Be aware that it must have at least 5 bytes to read,
  otherwise it will throw an {@link IllegalArgumentException}.
  @return encrypted
  {@code true} if the {@link ByteBuf} is encrypted, {@code false} otherwise.
  @throws IllegalArgumentException
  Is thrown if the given {@link ByteBuf} has not at least 5 bytes to read.