Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

15. Streams and I/O > Using Streams

Using Streams

The abstract Stream class is the base for all streams. It defines methods and properties for three fundamental operations: reading, writing, and seeking, as well as for administrative tasks such as closing, flushing, and configuring timeouts (see Table 15-1).

Table 15-1. Stream class members

Category

Members

Reading

public abstract bool CanRead { get; }

 

public abstract int Read (byte[] buffer, int offset, int count)

 

public virtual int ReadByte();

Writing

public abstract bool CanWrite { get; }

 

public abstract void Write (byte[] buffer, int offset, int count);

 

public virtual void WriteByte (byte value);

Seeking

public abstract bool CanSeek { get; }


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint