code: private static String slurpUtf8Part(HttpServletRequest request, HttpServletResponse response, String name, int maxLength)
              throws IOException, ServletException
      {
          Part part = request.getPart(name);
          if (part == null) {
              response.sendError(400, "Form field " + jq(name) + " is missing");
              return null;
          }
  
          byte[] bytes = new byte[maxLength];
          InputStream in = part.getInputStream();
          int bytesRead = in.read(bytes);
  
          if (bytesRead == -1) {
              return "";
          }
  
          String s = StringUtil.utf8ToString(bytes, 0, bytesRead);
  
          if (in.read() != -1) {
              response.sendError(400, "Field " + jq(name) + " is too long (the limit is " + maxLength + " bytes): " + jq(s));
              return null;
          }
  
          // TODO: We're just assuming the content is UTF-8 text.  We should actually check it.
          return s;
      }
docs: Reads in a single field of a multipart/form-data request.  If the field is not present
  or the field is longer than maxLength, we'll use the given HttpServletResponse to respond
  with an error and then return null.
  
  Otherwise, process it as UTF-8 bytes and return the equivalent String.