Package java.lang

Examples of java.lang.String.startsWith()


        int index = ciphers.indexOf(',');
        if (index != -1) {
            int fromIndex = 0;
            while (index != -1) {
                cipher = ciphers.substring(fromIndex, index).trim();
                if (cipher.length() > 0 && !cipher.startsWith("-")) {
                    if (cipher.startsWith("+")) {
                        cipher = cipher.substring(1);
                    }
                    String jsseCipher = getJSSECipher(cipher);
                    if (jsseCipher == null) {
View Full Code Here


        if (index != -1) {
            int fromIndex = 0;
            while (index != -1) {
                cipher = ciphers.substring(fromIndex, index).trim();
                if (cipher.length() > 0 && !cipher.startsWith("-")) {
                    if (cipher.startsWith("+")) {
                        cipher = cipher.substring(1);
                    }
                    String jsseCipher = getJSSECipher(cipher);
                    if (jsseCipher == null) {
                        _logger.log(Level.WARNING,
View Full Code Here

    String stage = getActualStage();

    Properties result = new Properties();
    for ( Map.Entry<Object, Object> entry : props.entrySet() ) {
      String key = String.valueOf( entry.getKey() );
      if ( key.startsWith( stage ) ) {
        String newKey = key.substring( stage.length() + 1 );
        result.setProperty( newKey, ( String ) entry.getValue() );
      }
    }
    return result;
View Full Code Here

     *
     * @param f Must a non-null File reference.
     */
    public void setSystemId(File f) {
        String fpath=f.getAbsolutePath();
        if( fpath.startsWith("/"))
    this.systemId= "file://" + fpath;
  else
    this.systemId = "file:///" + fpath;
    }

View Full Code Here

    proc.getOutputStream().close();
    final BufferedReader reader = readFromProcess(proc);
    try {
      String line;
      while ((line = reader.readLine()) != null)
        if (line.startsWith(mode) && line.endsWith(name))
          // found it!
          return;
      fail("expected entry " + name + " with mode " + mode + " but found none");
    } finally {
      proc.getOutputStream().close();
View Full Code Here

            name = file.getCanonicalPath();
        } catch (IOException e) {
            name = file.getAbsolutePath();
        }
        name = name.replace(File.separatorChar, '/');
        if (!name.startsWith("/")) {
            name = "/" + name;
        }
        // If the file does not exist, then assume that it's a directory
        if (!file.isFile()) {
            name = name + "/";
View Full Code Here

        if (dc == null) {
            return;
        }

        altDDName = altDDName.trim();
        if (altDDName.startsWith("/")) {
            altDDName = altDDName.substring(1);
        }
     
        String appLoc = dc.getSource().getParentArchive().getURI().getPath();
        altDDName = appLoc + altDDName;
View Full Code Here

      return '\b';
    else if(token.equals("formfeed"))
      return '\f';
    else if(token.equals("return"))
      return '\r';
    else if(token.startsWith("u"))
      {
      char c = (char) readUnicodeChar(token, 1, 4, 16);
      if(c >= '\uD800' && c <= '\uDFFF') // surrogate code unit?
        throw Util.runtimeException("Invalid character constant: \\u" + Integer.toString(c, 16));
      return c;
View Full Code Here

      char c = (char) readUnicodeChar(token, 1, 4, 16);
      if(c >= '\uD800' && c <= '\uDFFF') // surrogate code unit?
        throw Util.runtimeException("Invalid character constant: \\u" + Integer.toString(c, 16));
      return c;
      }
    else if(token.startsWith("o"))
      {
      int len = token.length() - 1;
      if(len > 3)
        throw Util.runtimeException("Invalid octal escape sequence length: " + len);
      int uc = readUnicodeChar(token, 1, len, 8);
View Full Code Here

    }
  m = ratioPat.matcher(s);
  if(m.matches())
    {
    String numerator = m.group(1);
    if (numerator.startsWith("+")) numerator = numerator.substring(1);

    return Numbers.divide(Numbers.reduceBigInt(BigInt.fromBigInteger(new BigInteger(numerator))),
                          Numbers.reduceBigInt(BigInt.fromBigInteger(new BigInteger(m.group(2)))));
    }
  return null;
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.