/// <exception cref="System.IO.IOException"></exception>
        private void DecideMode()
        {
            isBinary = RawText.IsBinary(binbuf, binbufcnt);
            int cachedLen = binbufcnt;

            binbufcnt = binbuf.Length + 1;
            // full!
            Write(binbuf, 0, cachedLen);
        }
Exemple #2
0
        /// <exception cref="System.IO.IOException"></exception>
        private bool IsBinary(WorkingTreeIterator.Entry entry)
        {
            InputStream @in = entry.OpenInputStream();

            try
            {
                return(RawText.IsBinary(@in));
            }
            finally
            {
                SafeClose(@in);
            }
        }
 /// <exception cref="System.IO.IOException"></exception>
 private bool FillBuffer()
 {
     cnt = @in.Read(buf, 0, buf.Length);
     if (cnt < 1)
     {
         return(false);
     }
     if (detectBinary)
     {
         isBinary     = RawText.IsBinary(buf, cnt);
         detectBinary = false;
     }
     ptr = 0;
     return(true);
 }
Exemple #4
0
 private bool IsBinary(byte[] content, int sz)
 {
     return(RawText.IsBinary(content, sz));
 }