code: private static void checkHttpDataSize(HttpData data) {
          try {
              data.checkSize(data.length());
          } catch (IOException ignored) {
              throw new IllegalArgumentException("Attribute bigger than maxSize allowed");
          }
      }
docs: Utility method