예제 #1
0
        /// <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);
        }
예제 #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);
            }
        }
예제 #3
0
 /// <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);
 }
예제 #4
0
 private bool IsBinary(byte[] content, int sz)
 {
     return(RawText.IsBinary(content, sz));
 }