code: private static int removeSpaces(char[] array, int pos, StringBuffer buf)
      {
          buf.delete(0, buf.length());
          for (; pos < array.length
              && (array[pos] == '=' || Character.isSpaceChar(array[pos])); pos++)
          {
              if (array[pos] == '=') {
                  buf.append(array[pos]);
              }
          }
          return pos;
      }
docs: Moves forward the current position in the array until the first not empty
  character is found.
  
  @param array the array of characters where the spaces are searched
  @param pos the current position in the array; starting from this position
  the spaces will be searched
  @param buf to this buffer all not empty characters will be added
  @return the new position int the array of characters