Class HTTPHeaders

java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.remoteviz.rendering.HTTPHeaders
All Implemented Interfaces:
Cloneable

public class HTTPHeaders extends Inventor implements Cloneable
This class represents the header configuration options for an HTTP request and response. Note that HTTPHeaders treats header names in a case-insensitive manner.

  • Constructor Details Link icon

    • HTTPHeaders Link icon

      public HTTPHeaders(HTTPHeaders obj)
      Copy constructor.
    • HTTPHeaders Link icon

      public HTTPHeaders()
      Creates an empty object.
  • Method Details Link icon

    • clone Link icon

      public Object clone()
    • getNameAt Link icon

      public String getNameAt(long index)
      Retrieves the header name from a collection index.

      Parameters:
      index - index of the header to retrieve

      Returns:
      the header name at the given index or an empty string if the given index does not exist.

    • remove Link icon

      public void remove(String name)
      Removes the header value under the given name.

      Parameters:
      name - the name of the header to remove from the collection.
    • getValue Link icon

      public String getValue(String name)
      Retrieves the value of a given header.

      Parameters:
      name - the name of the header to check

      Returns:
      the value of the given header name or an empty string if the given header does not exist.

    • add Link icon

      public void add(String name, String value)
      Adds the given header value under the given name. If a header already exists with the given name, its value will be overwritten.

      Parameters:
      name - the header to add to the collection.

      value - the content of the header.
    • clear Link icon

      public void clear()
      Removes all headers.
    • exists Link icon

      public boolean exists(String name)
      Determines if the headers collection contains a header of the specified name, with any value. param name the name of the header to check

      Returns:
      true if the given header exists.

    • count Link icon

      public long count()
      Gets the number of HTTP headers.

      Returns:
      number of HTTP headers.