congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HttpVersion.compareTo
Code IndexAdd Tabnine to your IDE (free)

How to use
compareTo
method
in
org.jboss.netty.handler.codec.http.HttpVersion

Best Java code snippets using org.jboss.netty.handler.codec.http.HttpVersion.compareTo (Showing top 1 results out of 315)

origin: io.netty/netty

/**
 * Returns {@code true} if and only if the specified message contains the
 * {@code "Expect: 100-continue"} header.
 */
public static boolean is100ContinueExpected(HttpMessage message) {
  // Expect: 100-continue is for requests only.
  if (!(message instanceof HttpRequest)) {
    return false;
  }
  // It works only on HTTP/1.1 or later.
  if (message.getProtocolVersion().compareTo(HttpVersion.HTTP_1_1) < 0) {
    return false;
  }
  // In most cases, there will be one or zero 'Expect' header.
  String value = message.headers().get(Names.EXPECT);
  if (value == null) {
    return false;
  }
  if (Values.CONTINUE.equalsIgnoreCase(value)) {
    return true;
  }
  // Multiple 'Expect' headers.  Search through them.
  return message.headers().contains(Names.EXPECT, Values.CONTINUE, true);
}
org.jboss.netty.handler.codec.httpHttpVersioncompareTo

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
  • <init>
    Creates a new HTTP version with the specified version string. You will not need to create a new inst

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JPanel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Sublime Text plugins
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