public override long GetKnownFileSize() { if (FileBytes != null) { return(FileBytes.Length); } #if USE_MEMORY_MAPPED_FILE //return FileView.Capacity; return(FileSize); #elif USE_FILE_HANDLE return(File.Length); #elif USE_JAVA_FILEHANDLE return(File != null?File.GetFileSize() : 0); #else return(FileBytes != null ? FileBytes.Length : 0); #endif }