docs: protected List<HandlerWrapper> createHandlerWrappers(Class<?> type, MessageHandler handler, boolean partialHandler) {
          //check the encodings first
          Encoding encoding = session.getEncoding();
          List<HandlerWrapper> ret = new ArrayList<>(2);
          if (encoding.canDecodeText(type)) {
              ret.add(new HandlerWrapper(FrameType.TEXT, handler, type, true, false));
          }
          if (encoding.canDecodeBinary(type)) {
              ret.add(new HandlerWrapper(FrameType.BYTE, handler, type, true, false));
          }
          if(!ret.isEmpty()) {
              return ret;
          }
          if (partialHandler) {
              // Partial message handler supports only String, byte[] and ByteBuffer.
              // See JavaDocs of the MessageHandler.Partial interface.
              if (type == String.class) {
                  return Collections.singletonList(new HandlerWrapper(FrameType.TEXT, handler, type, false, true));
              }
              if (type == byte[].class || type == ByteBuffer.class) {
                  return Collections.singletonList(new HandlerWrapper(FrameType.BYTE, handler, type, false, true));
              }
              throw JsrWebSocketMessages.MESSAGES.unsupportedFrameType(type);
          }
          if (type == byte[].class || type == ByteBuffer.class || type == InputStream.class) {
              return Collections.singletonList(new HandlerWrapper(FrameType.BYTE, handler, type, false, false));
          }
          if (type == String.class || type == Reader.class) {
              return Collections.singletonList(new HandlerWrapper(FrameType.TEXT, handler, type, false, false));
          }
          if (type == PongMessage.class) {
              return Collections.singletonList(new HandlerWrapper(FrameType.PONG, handler, type, false, false));
          }
          throw JsrWebSocketMessages.MESSAGES.unsupportedFrameType(type);
      }