congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • findViewById (Activity)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ImageIO (javax.imageio)
  • JCheckBox (javax.swing)
  • JComboBox (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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