Calyptus.Lob.StreamBlob.StreamBlob C# (CSharp) Method

StreamBlob() public method

public StreamBlob ( Stream stream ) : System.IO
stream Stream
return System.IO
		public StreamBlob(Stream stream)
		{
			if (stream == null) throw new ArgumentNullException("stream");
			if (!stream.CanRead) throw new NotSupportedException("Stream cannot read. Blobs are read-only.");

			this.stream = stream;
			try
			{
				this.initialPosition = stream.CanSeek ? stream.Position : -1L;
			}
			catch
			{
				this.initialPosition = -1L;
			}
		}