- private static long getHeaderLength(byte[] bytes) {
- byte[] HEADER_START = new byte[] { (byte) 0x0a, (byte) 0x23 };
- return Long.parseLong(Charsets.US_ASCII.decode(
- ByteBuffer.wrap(bytes, HEADER_START.length, bytes.length - HEADER_START.length - 1)).toString());
+ private static long getHeaderLength(final byte[] bytes) {
+ byte[] headerStart = new byte[]{(byte) 0x0a, (byte) 0x23};
+ return Long.parseLong(StandardCharsets.US_ASCII.decode(
+ ByteBuffer.wrap(bytes, headerStart.length, bytes.length - headerStart.length - 1)).toString());