C# Class SimpleFramework.Xml.Stream.OutputBuffer

This is primarily used to replace the StringBuffer class, as a way for the Formatter to store the start tag for an XML element. This enables the start tag of the current element to be removed without disrupting any of the other nodes within the document. Once the contents of the output buffer have been filled its contents can be emitted to the writer object.
Datei anzeigen Open project: ngallagher/simplexml Class Usage Examples

Public Methods

Method Description
Append ( String value ) : void

This will add a String to the end of the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate large string objects.

Append ( String value, int off, int len ) : void

This will add a String to the end of the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate large string objects.

Append ( char ch ) : void

This will add a char to the end of the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate more characters.

Append ( char value, int off, int len ) : void

This will add a char array to the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate large character arrays.

Clear ( ) : void

This will empty the OutputBuffer so that it does not contain any content. This is used to that when the buffer is written to a specified Writer object nothing is written out. This allows XML elements to be removed.

OutputBuffer ( ) : System.Text

Constructor for OutputBuffer. The default OutputBuffer stores 16 characters before a resize is needed to append extra characters.

Write ( TextWriter writer ) : void

This method is used to write the contents of the buffer to the specified Writer object. This is used when the XML element is to be committed to the resulting XML document.

Method Details

Append() public method

This will add a String to the end of the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate large string objects.
public Append ( String value ) : void
value String /// the string to be appended to this output buffer ///
return void

Append() public method

This will add a String to the end of the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate large string objects.
public Append ( String value, int off, int len ) : void
value String /// the string to be appended to the output buffer ///
off int /// the offset to begin reading from the string ///
len int /// the number of characters to append to this ///
return void

Append() public method

This will add a char to the end of the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate more characters.
public Append ( char ch ) : void
ch char /// the character to be appended to the buffer ///
return void

Append() public method

This will add a char array to the buffer. The buffer will not overflow with repeated uses of the append, it uses an ensureCapacity method which will allow the buffer to dynamically grow in size to accommodate large character arrays.
public Append ( char value, int off, int len ) : void
value char /// the character array to be appended to this ///
off int /// the read offset for the array to begin reading ///
len int /// the number of characters to append to this ///
return void

Clear() public method

This will empty the OutputBuffer so that it does not contain any content. This is used to that when the buffer is written to a specified Writer object nothing is written out. This allows XML elements to be removed.
public Clear ( ) : void
return void

OutputBuffer() public method

Constructor for OutputBuffer. The default OutputBuffer stores 16 characters before a resize is needed to append extra characters.
public OutputBuffer ( ) : System.Text
return System.Text

Write() public method

This method is used to write the contents of the buffer to the specified Writer object. This is used when the XML element is to be committed to the resulting XML document.
public Write ( TextWriter writer ) : void
writer System.IO.TextWriter
return void