public static boolean startsWith(byte[] bs, byte[] head) {
        if (bs.length < head.length) {
            return false;
        }
        for (int i = 0; i < head.length; i++) {
            if (head[i] != bs[i]) {
                return false;
            }
        }
        return true;
    }
@Test
    public void startsWith() {
        Assert.assertTrue(CodecUtils.startsWith(new byte[] { 1, 2, 3 }, new byte[] { 1, 2 }));
        Assert.assertFalse(CodecUtils.startsWith(new byte[] { 2, 3 }, new byte[] { 1, 2 }));
        Assert.assertFalse(CodecUtils.startsWith(new byte[] { 3 }, new byte[] { 1, 2 }));
    }