code: public static String[] splitLongString(
          String str, char separator, char quote)
      {
          int len = (str == null) ? 0 : str.length();
          if (str == null || len == 0)
          {
              return ArrayUtils.EMPTY_STRING_ARRAY;
          }
  
          int       oldPos = 0;
          ArrayList list = new ArrayList();
          for (int pos = 0; pos < len; oldPos = ++pos)
          {
              // Skip quoted text, if any
              while ((pos < len) && (str.charAt(pos) == quote))
              {
                  pos = str.indexOf(quote, pos + 1) + 1;
  
                  if (pos == 0)
                  {
                      throw new IllegalArgumentException(
                          "Closing quote missing in string '" + str + "'");
                  }
              }
  
              boolean quoted;
  
              if (pos != oldPos)
              {
                  quoted = true;
  
                  if ((pos < len) && (str.charAt(pos) != separator))
                  {
                      throw new IllegalArgumentException(
                          "Separator must follow closing quote in string '"
                          + str + "'");
                  }
              }
              else
              {
                  quoted     = false;
                  pos        = str.indexOf(separator, pos);
                  if (pos < 0)
                  {
                      pos = len;
                  }
              }
  
              list.add(
                  quoted ? dequote(str, oldPos + 1, pos - 1, quote)
                      : substring(str, oldPos, pos));
          }
  
          return (String[]) list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
      }
docs: Split a string into an array of strings arround a character separator.
  Each element can be optionally quoted by the quote character.<br>
  This function will be efficient for long strings
  
  @param str the string to be split
  @param separator the separator character
  @param quote the quote character
  
  @return array of string subparts
  
  @throws IllegalArgumentException DOCUMENT ME!