Example usage for io.netty.handler.codec.http HttpVersion toString

List of usage examples for io.netty.handler.codec.http HttpVersion toString

Introduction

In this page you can find the example usage for io.netty.handler.codec.http HttpVersion toString.

Prototype

@Override
public String toString() 

Source Link

Document

Returns the full protocol version text such as "HTTP/1.0" .

Usage

From source file:com.titilink.camel.rest.common.AdapterRestletUtil.java

License:LGPL

protected static String getProtocolVersion(HttpVersion protocol) {
    String result = null;/*from  ww w  .  ja  v  a  2 s  .c om*/
    final String protocolVersion = protocol.toString();
    final int index = protocolVersion.indexOf('/');

    if (index != -1) {
        result = protocolVersion.substring(index + 1);
    }
    return result;
}