Base Framework
Public Member Functions | List of all members
PrimitiveOutputStream Class Reference

Primitive output stream. More...

#include <base/io/PrimitiveOutputStream.h>

Inherits FilterOutputStream.

Public Member Functions

 PrimitiveOutputStream (OutputStream &out)
 
void writeBoolean (bool value)
 
void writeChar (char value)
 
void writeShortInteger (short value)
 
void writeUnsignedShortInteger (unsigned short value)
 
void writeInteger (int value)
 
void writeUnsignedInteger (unsigned int value)
 
void writeLongInteger (long long value)
 
void writeUnsignedLongInteger (unsigned long long value)
 
void writeFloat (float value)
 
void writeDouble (double value)
 
void writeLongDouble (long double value)
 
- Public Member Functions inherited from FilterOutputStream
 FilterOutputStream (OutputStream &out)
 
OutputStreamgetOutputStream () noexcept
 
void close ()
 
void flush ()
 
unsigned int write (const uint8 *buffer, unsigned int size, bool nonblocking=false)
 
- Public Member Functions inherited from Stream
virtual ~Stream () noexcept(false)
 
- Public Member Functions inherited from ReferenceCountedObject
 ReferenceCountedObject () noexcept
 
 ReferenceCountedObject (const ReferenceCountedObject &copy) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&move) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &copy) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&move) noexcept
 
MemorySize getNumberOfReferences_INTERNAL () const noexcept
 
virtual bool useGarbageCollector () const noexcept
 
- Public Member Functions inherited from DynamicObject
 DynamicObject () noexcept
 
bool isValidObject () const noexcept
 
virtual ~DynamicObject () noexcept(false)
 
 _COM_AZURE_DEV__BASE__OVERRIDE_ALLOC ()
 

Additional Inherited Members

- Protected Attributes inherited from FilterOutputStream
OutputStreamout
 

Detailed Description

Primitive output stream.

A FilterOutputStream that allows you to write primitive data types to an output stream in big-endian format. MT-Safe implementation if used with MT-safe input stream.

Version
1.0

Constructor & Destructor Documentation

◆ PrimitiveOutputStream()

PrimitiveOutputStream::PrimitiveOutputStream ( OutputStream out)
explicit

Initializes the data output stream.

Parameters
outOutput stream to be filtered.

Member Function Documentation

◆ writeBoolean()

void PrimitiveOutputStream::writeBoolean ( bool  value)

Writes a boolean (8 bits) to the stream.

◆ writeChar()

void PrimitiveOutputStream::writeChar ( char  value)

Writes a byte/character (8 bits) to the stream.

◆ writeDouble()

void PrimitiveOutputStream::writeDouble ( double  value)

Writes a double (IEEE 64 bit format) to the stream.

◆ writeFloat()

void PrimitiveOutputStream::writeFloat ( float  value)

Writes a float (IEEE 32 bit format) to the stream.

◆ writeInteger()

void PrimitiveOutputStream::writeInteger ( int  value)

Writes an integer (32 bits) to the stream.

◆ writeLongDouble()

void PrimitiveOutputStream::writeLongDouble ( long double  value)

Writes a long double (Intel 386 style 80 bit format) to the stream.

◆ writeLongInteger()

void PrimitiveOutputStream::writeLongInteger ( long long  value)

Writes a long long integer (64 bits) to the stream.

◆ writeShortInteger()

void PrimitiveOutputStream::writeShortInteger ( short  value)

Writes a short integer (16 bits) to the stream.

◆ writeUnsignedInteger()

void PrimitiveOutputStream::writeUnsignedInteger ( unsigned int  value)

Writes an unsigned integer (32 bits) to the stream.

◆ writeUnsignedLongInteger()

void PrimitiveOutputStream::writeUnsignedLongInteger ( unsigned long long  value)

Writes an unsigned long long (64 bits) integer to the stream.

◆ writeUnsignedShortInteger()

void PrimitiveOutputStream::writeUnsignedShortInteger ( unsigned short  value)

Writes an unsigned short integer (16 bits) to the stream.