docs: public String transferStream(InputStream in, int size)
      {
          StringBuilder sb = new StringBuilder();
          try {
              byte[] cbuf = new byte[1000];
              int iLen = Math.max(size, cbuf.length);
              while ((iLen = in.read(cbuf, 0, iLen)) > 0)
              {   // Write the entire file to the output buffer
                  for (int i = 0; i < iLen; i++)
                  {
                      sb.append(Character.toChars(cbuf[i]));
                  }
                  size = size - iLen;
                  iLen = Math.max(size, cbuf.length);
              }
          } catch (MalformedURLException ex)  {
              ex.printStackTrace();
          } catch (IOException ex) {
              ex.printStackTrace();
          }
          return sb.toString();
      }