Host (Apache Tomcat 7.0.103 API Documentation)

org.apache.tomcat.util.http.parser

## Class Host

- java.lang.Object
- - org.apache.tomcat.util.http.parser.Host

-     public class Host
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Host()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `parse(MessageBytes mb)` Parse the given input as an HTTP Host header value.
    `static int` | `parse(String string)` Parse the given input as an HTTP Host header value.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Host

          public Host()

  - ### Method Detail

    - #### parse

          public static int parse(MessageBytes mb)

      Parse the given input as an HTTP Host header value.
      Parameters:
        `mb` - The host header value
      Returns:
        The position of ':' that separates the host from the port or -1 if it is not present
      Throws:
        `IllegalArgumentException` - If the host header value is not specification compliant

    - #### parse

          public static int parse(String string)

      Parse the given input as an HTTP Host header value.
      Parameters:
        `string` - The host header value
      Returns:
        The position of ':' that separates the host from the port or -1 if it is not present
      Throws:
        `IllegalArgumentException` - If the host header value is not specification compliant

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.