congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
HttpVersion.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jboss.netty.handler.codec.http.HttpVersion
constructor

Best Java code snippets using org.jboss.netty.handler.codec.http.HttpVersion.<init> (Showing top 2 results out of 315)

origin: io.netty/netty

/**
 * Returns an existing or new {@link HttpVersion} instance which matches to
 * the specified RTSP version string.  If the specified {@code text} is
 * equal to {@code "RTSP/1.0"}, {@link #RTSP_1_0} will be returned.
 * Otherwise, a new {@link HttpVersion} instance will be returned.
 */
public static HttpVersion valueOf(String text) {
  if (text == null) {
    throw new NullPointerException("text");
  }
  text = text.trim().toUpperCase();
  if ("RTSP/1.0".equals(text)) {
    return RTSP_1_0;
  }
  return new HttpVersion(text, true);
}
origin: io.netty/netty

/**
 * Returns an existing or new {@link HttpVersion} instance which matches to
 * the specified protocol version string.  If the specified {@code text} is
 * equal to {@code "HTTP/1.0"}, {@link #HTTP_1_0} will be returned.  If the
 * specified {@code text} is equal to {@code "HTTP/1.1"}, {@link #HTTP_1_1}
 * will be returned.  Otherwise, a new {@link HttpVersion} instance will be
 * returned.
 */
public static HttpVersion valueOf(String text) {
  if (text == null) {
    throw new NullPointerException("text");
  }
  text = text.trim().toUpperCase();
  if ("HTTP/1.1".equals(text)) {
    return HTTP_1_1;
  }
  if ("HTTP/1.0".equals(text)) {
    return HTTP_1_0;
  }
  return new HttpVersion(text, true);
}
org.jboss.netty.handler.codec.httpHttpVersion<init>

Javadoc

Creates a new HTTP version with the specified protocol name and version numbers. You will not need to create a new instance unless you are implementing a protocol derived from HTTP, such as RTSP and ICAP

Popular methods of HttpVersion

  • equals
  • getText
    Returns the full protocol version text such as "HTTP/1.0".
  • getMajorVersion
    Returns the name of the protocol such as 1 in "HTTP/1.0".
  • getMinorVersion
    Returns the name of the protocol such as 0 in "HTTP/1.0".
  • getProtocolName
    Returns the name of the protocol such as "HTTP" in "HTTP/1.0".
  • toString
    Returns the full protocol version text such as "HTTP/1.0".
  • isKeepAliveDefault
    Returns true if and only if the connection is kept alive unless the "Connection" header is set to "c
  • valueOf
    Returns an existing or new HttpVersion instance which matches to the specified protocol version stri
  • compareTo

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now