Package java.lang

Examples of java.lang.String.startsWith()


  public List<?> load( @NotNull Reader in ) throws IOException {
    //noinspection IOResourceOpenedButNotSafelyClosed
    BufferedReader br = new BufferedReader( in );
    String firstLine = br.readLine().trim();//xml

    if ( !firstLine.startsWith( XML_HEADER_BEGIN ) || !firstLine.endsWith( XML_HEADER_SUFFIX ) ) {
      throw new IllegalStateException( "Invalid start of file. Was <" + firstLine + "> but exepcted something like <" + XML_HEADER_BEGIN + XML_HEADER_SUFFIX + '>' );
    }

    return ( ( Configurations ) xStream.fromXML( br ) ).getConfigurations();
  }
View Full Code Here


  public List<?> load( @Nonnull Reader in ) throws IOException {
    //noinspection IOResourceOpenedButNotSafelyClosed
    BufferedReader br = new BufferedReader( in );
    String firstLine = br.readLine().trim();//xml

    if ( !firstLine.startsWith( XML_HEADER_BEGIN ) || !firstLine.endsWith( XML_HEADER_SUFFIX ) ) {
      throw new IllegalStateException( "Invalid start of file. Was <" + firstLine + "> but exepcted something like <" + XML_HEADER_BEGIN + XML_HEADER_SUFFIX + '>' );
    }

    return ( ( Configurations ) xStream.fromXML( br ) ).getConfigurations();
  }
View Full Code Here

     

      // JvB: send a 400 response for requests (except ACK)
      // Currently only UDP, @todo also other transports
      String msgString = new String(msgBytes, 0, packetLength);
      if (!msgString.startsWith("SIP/") && !msgString.startsWith("ACK ")) {

        String badReqRes = createBadReqRes(msgString, ex);
        if (badReqRes != null) {
          if (sipStack.isLoggingEnabled()) {
            sipStack.getLogWriter().logDebug(
View Full Code Here

     

      // JvB: send a 400 response for requests (except ACK)
      // Currently only UDP, @todo also other transports
      String msgString = new String(msgBytes, 0, packetLength);
      if (!msgString.startsWith("SIP/") && !msgString.startsWith("ACK ")) {

        String badReqRes = createBadReqRes(msgString, ex);
        if (badReqRes != null) {
          if (sipStack.isLoggingEnabled()) {
            sipStack.getLogWriter().logDebug(
View Full Code Here

      }

      // JvB: send a 400 response for requests (except ACK)
      // Currently only UDP, @todo also other transports
      String msgString = new String(msgBytes, 0, packetLength);
      if (!msgString.startsWith("SIP/") && !msgString.startsWith("ACK ")) {

        String badReqRes = createBadReqRes(msgString, ex);
        if (badReqRes != null) {
          if (sipStack.isLoggingEnabled()) {
            sipStack.getLogWriter().logDebug(
View Full Code Here

      }

      // JvB: send a 400 response for requests (except ACK)
      // Currently only UDP, @todo also other transports
      String msgString = new String(msgBytes, 0, packetLength);
      if (!msgString.startsWith("SIP/") && !msgString.startsWith("ACK ")) {

        String badReqRes = createBadReqRes(msgString, ex);
        if (badReqRes != null) {
          if (sipStack.isLoggingEnabled()) {
            sipStack.getLogWriter().logDebug(
View Full Code Here

      }

      // JvB: send a 400 response for requests (except ACK)
      // Currently only UDP, @todo also other transports
      String msgString = new String(msgBytes, 0, packetLength);
      if (!msgString.startsWith("SIP/") && !msgString.startsWith("ACK ")) {

        String badReqRes = createBadReqRes(msgString, ex);
        if (badReqRes != null) {
          if (sipStack.isLoggingEnabled()) {
            sipStack.getLogWriter().logDebug(
View Full Code Here

      }

      // JvB: send a 400 response for requests (except ACK)
      // Currently only UDP, @todo also other transports
      String msgString = new String(msgBytes, 0, packetLength);
      if (!msgString.startsWith("SIP/") && !msgString.startsWith("ACK ")) {

        String badReqRes = createBadReqRes(msgString, ex);
        if (badReqRes != null) {
          if (sipStack.isLoggingEnabled()) {
            sipStack.getLogWriter().logDebug(
View Full Code Here

                contextRoot = params.previousContextRoot;
            }
            if(contextRoot==null)
                contextRoot = dc.getOriginalSource().getName();

            if (!contextRoot.startsWith("/")) {
                contextRoot = "/" + contextRoot;
            }
            wbd.setContextRoot(contextRoot);
            wbd.setName(params.name());
View Full Code Here

        // server-name (may contain scheme and colon-separated port number)
        String serverName = http.getServerName();
        if (serverName != null && serverName.length() > 0) {
            // Ignore scheme, which was required for webcore issued redirects
            // in 8.x EE
            if (serverName.startsWith("http://")) {
                serverName = serverName.substring("http://".length());
            } else if (serverName.startsWith("https://")) {
                serverName = serverName.substring("https://".length());
            }
            int index = serverName.indexOf(':');
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.