public static string GetPrefixedLine(byte[] array, string prefix, int startIndex, int count, Encoding encoding, out int lineLimit)
        {
            lineLimit = -1;
            byte[] prefixBytes = encoding.GetBytes(prefix);

            int prefixPosition = ByteArrayUtils.IndexOf(array, prefixBytes, startIndex, count);

            if (prefixPosition == -1)
            {
                return(null);
            }
            return(ByteArrayUtils.GetLine(array, prefixPosition + prefixBytes.Length,
                                          count - prefixPosition - prefixBytes.Length + startIndex, encoding, out lineLimit));
        }
        public static string GetLine(byte[] array, int startIndex, int count, Encoding encoding)
        {
            int lineLimit;

            return(ByteArrayUtils.GetLine(array, startIndex, count, encoding, out lineLimit));
        }