Ejemplo n.º 1
0
		/// <summary>Returns true if the provided input stream is an FSInputStream and
		/// is a clone, that is it does not own its underlying file descriptor.
		/// </summary>
		public static bool IsFSInputStreamClone(InputStream is_Renamed)
		{
			if (isFSInputStream(is_Renamed))
			{
				return ((FSInputStream) is_Renamed).isClone;
			}
			else
			{
				return false;
			}
		}
Ejemplo n.º 2
0
		/// <summary>Given an instance of FSDirectory.FSInputStream, this method returns
		/// true if the underlying file descriptor is valid, and false otherwise.
		/// This can be used to determine if the OS file has been closed.
		/// The descriptor becomes invalid when the non-clone instance of the
		/// FSInputStream that owns this descriptor is closed. However, the
		/// descriptor may possibly become invalid in other ways as well.
		/// </summary>
		public static bool IsFSInputStreamOpen(InputStream is_Renamed)
		{
			if (isFSInputStream(is_Renamed))
			{
				FSInputStream fis = (FSInputStream) is_Renamed;
				return fis.IsFDValid();
			}
			else
			{
				return false;
			}
		}
Ejemplo n.º 3
0
		/// <summary>Returns true if the instance of the provided input stream is actually
		/// an FSInputStream.
		/// </summary>
		public static bool isFSInputStream(InputStream is_Renamed)
		{
			return is_Renamed is FSInputStream;
		}