/// <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); }
/// <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); }
private bool IsBinary(byte[] content, int sz) { return(RawText.IsBinary(content, sz)); }