private int getSeparatorIndex ( ByteBuffer buf ) { int colon = BufferUtils . indexOf ( buf , ( byte ) ' ' ) ; if ( colon == - 1 ) { throw new IllegalStateException ( "Unknown encoding format: " + ByteBufferUtil . bytesToHex ( buf ) ) ; } return colon ; }
Returns the index of the colon that separates the encoding prefix from the body suffix .