Example usage for io.netty.util AsciiString concat

List of usage examples for io.netty.util AsciiString concat

Introduction

In this page you can find the example usage for io.netty.util AsciiString concat.

Prototype

public AsciiString concat(CharSequence string) 

Source Link

Document

Concatenates this string and the specified string.

Usage

From source file:org.cloudfoundry.reactor.util.MultipartHttpOutbound.java

License:Apache License

private static ByteBuf getHeaders(ByteBufAllocator allocator, HttpHeaders headers) {
    AsciiString s = AsciiString.EMPTY_STRING;

    for (Map.Entry<String, String> entry : headers) {
        s = s.concat(new AsciiString(entry.getKey())).concat(HEADER_DELIMITER).concat(entry.getValue())
                .concat(CRLF);/*from www  . jav  a2  s  .  co  m*/
    }

    return allocator.directBuffer(s.length()).writeBytes(s.toByteArray());
}