public int getPostIndex(byte[] bytes, Charset charset) {
        String firstBytes = new String(bytes, charset);
        String separator = CRLFx2;
        int index = firstBytes.indexOf(CRLFx2);
        int indexCR = firstBytes.indexOf(CRx2);
        int indexLF = firstBytes.indexOf(LFx2);
        if (indexCR != -1 && indexCR < index) {
            separator = CRx2;
            index = indexCR;
        }
        if (indexLF != -1 && indexLF < index)
            separator = LFx2;
        return getByteIndexIncludingSeparator(firstBytes, separator);
    }