List of usage examples for io.netty.util AsciiString concat
public AsciiString concat(CharSequence string)
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()); }