Examples of startsWith()


Examples of ariba.util.core.FastStringBuffer.startsWith()

        @return the string passed in but with the prefix removed
    */
    private String removeLogPrefix (String s)
    {
        FastStringBuffer buf = new FastStringBuffer(s);
        if (buf.startsWith(StringTablePrefix)) {
            return buf.substring(StringTablePrefix.length(), s.length());
        }

        return s;
    }
View Full Code Here

Examples of ch.entwine.weblounge.common.url.Path.startsWith()

   * Test method for {@link ch.entwine.weblounge.common.impl.url.UrlImpl#startsWith(java.lang.String)}.
   */
  @Test
  public void testStartsWith() {
    Path u = new UrlImpl("/ab/c/d");
    assertTrue(u.startsWith("/ab"));
    assertFalse(u.startsWith("ab"));
    assertFalse(u.startsWith("abc"));
    assertFalse(u.startsWith("/abc"));
  }

View Full Code Here

Examples of clojure.lang.PersistentArrayMap.startsWith()

                            if (iter!=null)
                            {
                                while (iter.hasNext())
                                {
                                    final String entry=(String)iter.next();
                                    if ((filter != null) && (entry.startsWith(filter)))
                                        return true;
                                }
                            }

                            return false;
View Full Code Here

Examples of com.aptana.shared_core.string.FastStringBuffer.startsWith()

            String expected = "-- VERSION_" + AbstractAdditionalTokensInfo.version; //X is the version
            InputStreamReader reader = new InputStreamReader(fileInputStream);
            FastBufferedReader bufferedReader = new FastBufferedReader(reader);
            FastStringBuffer string = bufferedReader.readLine();
            ObjectsPoolMap objectsPoolMap = new ObjectsPool.ObjectsPoolMap();
            if (string != null && string.startsWith("-- VERSION_")) {
                Tuple tupWithResults = new Tuple(new Tuple3(null, null, null), null);
                Tuple3 superTupWithResults = (Tuple3) tupWithResults.o1;
                //tupWithResults.o2 = DiskCache
                if (string.toString().equals(expected)) {
                    //OK, proceed with new I/O format!
View Full Code Here

Examples of com.aqpproject.worldmodel.data.Item.startsWith()

        ArrayList<String> currentMissileList = new ArrayList();
        ArrayList<String> currentBombList = new ArrayList();
        ArrayList<String> currentMineList = new ArrayList();
        ArrayList<String> currentDynamicObjectList = new ArrayList();
        for (String it : currentItemList) {
            if (it.startsWith("Missile_") && !it.endsWith("_Explosion")) {
                currentMissileList.add(it);
            } else if (it.startsWith("Bomb_") && !it.endsWith("_Explosion")) {
                currentBombList.add(it);
            } else if (it.startsWith("Mine_") && !it.endsWith("_Explosion")) {
                currentMineList.add(it);
View Full Code Here

Examples of com.britesnow.snow.web.handler.annotation.WebModelHandler.startsWith()

                // if this is for a leaf path, grab the startWith values from the
                // the web model handler annotation.
                // todo - warn if startsWith has no entries which has no effect?
                if (webModelHandlerAnnotation.leaf()) {
                    String[] leafPaths = webModelHandlerAnnotation.startsWith();
                    // make sure they all have trailing slashes...
                    for (int i = 0; i < leafPaths.length; i++) {
                        if (!leafPaths[i].endsWith("/")) {
                            leafPaths[i] += "/";
                        }
View Full Code Here

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

          if (! is.readLine(line)) {
            if (ws != null)
              ws.println("</message>");
            return false;
          }
          if (ws != null && ! line.startsWith("From ")) {
            for (int i = 0; i < line.length(); i++) {
              char ch = line.charAt(i);
              if (ch == '<')
                ws.print("&lt;");
              else
View Full Code Here

Examples of com.caucho.util.CharSegment.startsWith()

        = _invocation.getMultipartConfig();

      if (contentType == null || ! "POST".equalsIgnoreCase(getMethod())) {
      }

      else if (contentType.startsWith("application/x-www-form-urlencoded")) {
        formParser.parsePostData(form, getInputStream(), javaEncoding);
      }

      else if ((getWebApp().doMultipartForm() || multipartConfig != null)
               && contentType.startsWith("multipart/form-data")) {
View Full Code Here

Examples of com.ebuddy.cassandra.Path.startsWith()

     */
    private Map<Path,Object> getTerminalPathMap(Path inputPath, Map<String,Object> columnsMap) {
        Map<Path,Object> pathMap = new HashMap<Path,Object>(columnsMap.size());
        for (Map.Entry<String,Object> entry : columnsMap.entrySet()) {
            Path path = DefaultPath.fromEncodedPathString(entry.getKey());
            if (!path.startsWith(inputPath)) {
                throw new IllegalStateException("unexpected path found in database:" + path);
            }
            path = path.tail(inputPath.size());
            pathMap.put(path, entry.getValue());
        }
View Full Code Here

Examples of com.ibm.commons.util.io.LookAheadInputStream.startsWith()

          if(!item.isFormField()) {
            String fileName = item.getName();
            InputStream is = item.getInputStream();
            try {
              LookAheadInputStream lis = new LookAheadInputStream(is, 16);
              if(!lis.startsWith("PK")) {
                result(req, resp, HttpServletResponse.SC_BAD_REQUEST, "The uploaded file is not a zip file");
                return;
              }
              JsonImport imp = new JsonImport(new JsonImport.ZipImportSource(lis));
             
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.