public byte [ ] readStringNulByBytes ( ) { byte [ ] result = new byte [ byteBuf . bytesBefore ( ( byte ) 0 ) ] ; byteBuf . readBytes ( result ) ; byteBuf . skipBytes ( 1 ) ; return result ; }
Read null terminated string from byte buffers and return bytes .