List of usage examples for io.netty.buffer ByteBufUtil copy
public static void copy(AsciiString src, int srcIdx, ByteBuf dst, int dstIdx, int length)
From source file:com.linecorp.armeria.server.grpc.ArmeriaServerCall.java
License:Apache License
private static void writeAscii(ByteBuf buf, int offset, CharSequence value, int valueLen) { if (value instanceof AsciiString) { ByteBufUtil.copy((AsciiString) value, 0, buf, offset, valueLen); } else {/* w w w .ja v a 2s . co m*/ writeCharSequence(buf, offset, value, valueLen); } }