DelphiBasics
  Home  |  Delphi .net Home  |  System.IO NameSpace
 .NET Framework
 Namespace References

 System
 System.Collections
 System.Globalization
 System.IO
 
  BinaryReader  Class 
  BinaryWriter  Class 
  BufferedStream  Class 
  Directory  Class 
  DirectoryInfo  Class 
  File  Class 
  FileAccess  Enumeration 
  FileAttributes  Enumeration 
  FileInfo  Class 
  FileMode  Enumeration 
  FileShare  Enumeration 
  FileStream  Class 
  FileSystemWatcher  Class 
  MemoryStream  Class 
  Path  Class 
  SeekOrigin  Enumeration 
  StreamReader  Class 
  StreamWriter  Class 
  StringReader  Class 
  StringWriter  Class 

 Articles and Tutorials

 Overview of .NET
 Delphi and .NET
 Winform Applications
 ASP .Net Applications
 ASP Web Services
 Framework Collections
 Framework String Handling
 Framework Files and Folders

 Author links

 Buy Website Traffic at
 Buywebsitetrafficexperts.com

 Buy Proxies at
 Buyproxies.io
 

 
 
  System.IO.BinaryWriter Class
 
 Description
Calling writeTextBlock This class is used to write primitive data in binary (rather than character) format to a stream. This stream is often targetted at a file, as in the examples.
 
The Write method provides good flexibility, allowing a range of primitive types, including strings to be written to the stream, with conversion to byte format where appropriate. For example, a Boolean true value gets stored in a whole byte with value of 1.
 
When reading from a Binary file, it is crucial that the formatting of data used by BinaryWriter be accurately recognised. Being 1 byte out of sequence can completely destroy the sequencing of the remaining file contents. After writeTextBlock
 Syntax
Constructor Create ;
Constructor Create ( DataStream : Stream );
Constructor Create ( DataStream : Stream; TextEncoding : System.Text.Encoding );
 Methods
Close  Closes the BinaryWriter
Seek  Seek to a specified offset from the start, current, or end stream position
Write  Write a primitive data element to the stream

 Fields
Null  BinaryWriter  Specifies a BinaryWriter with no backing store.
 Properties
BaseStream  BinaryWriter  Gets the underlying stream of the BinaryWriter.

 Microsoft MSDN links
 
System.IO
System.IO.BinaryWriter
 
Delphi Programming Neil Moffatt 2002 - 2016. All rights reserved.  |  Home Page