Tabnine Logo
HttpVersion.valueOf
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: io.netty/netty

@Override
protected HttpMessage createMessage(String[] initialLine) throws Exception {
  return new DefaultHttpRequest(
      HttpVersion.valueOf(initialLine[2]), HttpMethod.valueOf(initialLine[0]), initialLine[1]);
}
origin: io.netty/netty

/**
 * Returns the {@link HttpVersion} represented by the HTTP version header.
 */
public static HttpVersion getVersion(int spdyVersion, SpdyHeadersFrame frame) {
  try {
    return HttpVersion.valueOf(frame.headers().get(HttpNames.VERSION));
  } catch (Exception e) {
    return null;
  }
}
origin: io.netty/netty

@Override
protected HttpMessage createMessage(String[] initialLine) {
  return new DefaultHttpResponse(
      HttpVersion.valueOf(initialLine[0]),
      new HttpResponseStatus(Integer.valueOf(initialLine[1]), initialLine[2]));
}
origin: k3po/k3po

@Override
public void encode(Channel channel) throws Exception {
  HttpChannelConfig httpConfig = (HttpChannelConfig) channel.getConfig();
  ChannelBufferFactory bufferFactory = httpConfig.getBufferFactory();
  String versionName = versionEncoder.encode(bufferFactory).toString(US_ASCII);
  HttpVersion version = HttpVersion.valueOf(versionName);
  httpConfig.setVersion(version);
}
org.jboss.netty.handler.codec.httpHttpVersionvalueOf

Javadoc

Returns an existing or new HttpVersion instance which matches to the specified protocol version string. If the specified text is equal to "HTTP/1.0", #HTTP_1_0 will be returned. If the specified text is equal to "HTTP/1.1", #HTTP_1_1will be returned. Otherwise, a new HttpVersion instance will be returned.

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

Popular in Java

  • Updating database using SQL prepared statement
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onRequestPermissionsResult (Fragment)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Best IntelliJ 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