Package com.caucho.util

Examples of com.caucho.util.CharBuffer.substring()


      return addr.getHostName();
    }

    int p = host.indexOf(':');
    if (p >= 0)
      return host.substring(0, p);
    else
      return host.toString();
  }

  @Override
View Full Code Here


            break;

          String lower = line.toString().toLowerCase(Locale.ENGLISH);

          if (lower.startsWith("subject: ")) {
            subject = line.substring("subject: ".length()).trim();

            if (subject.toLowerCase(Locale.ENGLISH).startsWith("re:"))
              subject = subject.substring(3).trim();
          }
          else if (lower.startsWith("from: ")) {
View Full Code Here

            if (subject.toLowerCase(Locale.ENGLISH).startsWith("re:"))
              subject = subject.substring(3).trim();
          }
          else if (lower.startsWith("from: ")) {
            from = line.substring("from: ".length());
          }
          else if (lower.startsWith("date: ")) {
            date = line.substring("from: ".length());
          }
        } while (line.length() > 0);
View Full Code Here

          }
          else if (lower.startsWith("from: ")) {
            from = line.substring("from: ".length());
          }
          else if (lower.startsWith("date: ")) {
            date = line.substring("from: ".length());
          }
        } while (line.length() > 0);

        int index = messages.get(subject);
View Full Code Here

      if (lineMap != null) {
        p = file.indexOf(':');
        if (p > 0) {
          try {
            String filename = file.substring(0, p);
            int lineNo = Integer.parseInt(file.substring(p + 1));
            line = lineMap.convertLine(filename, lineNo);
          } catch (Exception e) {
          }
        }
View Full Code Here

      if (lineMap != null) {
        p = file.indexOf(':');
        if (p > 0) {
          try {
            String filename = file.substring(0, p);
            int lineNo = Integer.parseInt(file.substring(p + 1));
            line = lineMap.convertLine(filename, lineNo);
          } catch (Exception e) {
          }
        }
        else
View Full Code Here

      while (t.startsWith("../"))
        t.delete(0,3);

      int ai = t.indexOf('#');
      if (ai > -1) {
        path = t.substring(0,ai);
        anchor = t.substring(ai + 1);
      } else {
        path = t.toString();
      }
      t.clear();
View Full Code Here

        t.delete(0,3);

      int ai = t.indexOf('#');
      if (ai > -1) {
        path = t.substring(0,ai);
        anchor = t.substring(ai + 1);
      } else {
        path = t.toString();
      }
      t.clear();
      if (log.isLoggable(Level.FINEST)) {
View Full Code Here

            break;

          String lower = line.toString().toLowerCase();

          if (lower.startsWith("subject: ")) {
            subject = line.substring("subject: ".length()).trim();

            if (subject.toLowerCase().startsWith("re:"))
              subject = subject.substring(3).trim();
          }
          else if (lower.startsWith("from: ")) {
View Full Code Here

            if (subject.toLowerCase().startsWith("re:"))
              subject = subject.substring(3).trim();
          }
          else if (lower.startsWith("from: ")) {
            from = line.substring("from: ".length());
          }
          else if (lower.startsWith("date: ")) {
            date = line.substring("from: ".length());
          }
        } while (line.length() > 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.