List of usage examples for io.netty.util AsciiString charAt
@Override public char charAt(int index)
From source file:com.spotify.netty4.handler.codec.zmtp.benchmarks.CustomReqRepBenchmark.java
License:Apache License
private static boolean asciiEquals(final AsciiString s, final ByteBuf data, final int size) { final int ix = data.readerIndex(); if (size != s.length()) { return false; }//from ww w. j a v a2 s.c om for (int i = 0; i < size; i++) { char c = (char) data.getByte(ix + i); if (c != s.charAt(i)) { return false; } } return true; }