Package org.apache.commons.lang.text

Examples of org.apache.commons.lang.text.StrTokenizer


    public List<String> split(String input) {
        List<String> statements = new ArrayList<String>();
        StrBuilder currentSql = new StrBuilder();

        StrTokenizer lineTokenizer = new StrTokenizer(input);
        lineTokenizer.setDelimiterMatcher(StrMatcher.charSetMatcher("\r\n"));

        for (String line : lineTokenizer.getTokenArray()) {
          String strippedLine = StringUtils.stripEnd(line, null);
            if (!currentSql.isEmpty()) {
                currentSql.append(lineEnding.get());
            }
View Full Code Here


        }
     
        if (response.getStatusCode() == HttpStatus.SC_OK)
        {
          // logger.warn(method.getResponseCharSet());
          StrTokenizer tokenize = new StrTokenizer(response.getResponseBodyAsString());
          tokenize.setDelimiterString("\n");
          String [] containers = tokenize.getTokenArray();         
          ArrayList <FilesContainer> containerList = new ArrayList<FilesContainer>();
          for(String container : containers) {
            containerList.add(new FilesContainer(container, this));
          }
          return containerList;
View Full Code Here

            }
          }

          if (response.getStatusCode() == HttpStatus.SC_OK)
          {
            StrTokenizer tokenize = new StrTokenizer(response.getResponseBodyAsString());
            tokenize.setDelimiterString("\n");
            String [] containers = tokenize.getTokenArray();
            List<String> returnValue = new ArrayList<String>();
            for (String containerName: containers)
            {
              returnValue.add(containerName);
            }
View Full Code Here

    String value = params.get(key);
    if (value != null) {
      if (decode) {
        value = decode(value);
      }
      return new StrTokenizer(value, delimiter).setIgnoreEmptyTokens(false).getTokenArray();
    }
    return EMPTY;
  }
View Full Code Here

    World world = plugin.getSenderWorld(sender);
    AutoRefMatch match = plugin.getMatch(world);

    // reparse the args properly using the string tokenizer from org.apache.commons
    args = new StrTokenizer(StringUtils.join(args, ' '), StrMatcher.splitMatcher(),
      StrMatcher.quoteMatcher()).setTrimmerMatcher(StrMatcher.trimMatcher()).getTokenArray();

    try
    {
      HandlerNode node = cmap.get(command.getName());
View Full Code Here

        this.region = region;
    }

    public List<Container> handleResponse(final HttpResponse response) throws ClientProtocolException, IOException {
        if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
            final StrTokenizer tokenize = new StrTokenizer(EntityUtils.toString(response.getEntity()));
            tokenize.setDelimiterString("\n");
            final String[] containers = tokenize.getTokenArray();
            ArrayList<Container> list = new ArrayList<Container>();
            for(String container : containers) {
                list.add(new Container(region, container));
            }
            return list;
View Full Code Here

TOP

Related Classes of org.apache.commons.lang.text.StrTokenizer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.