\hypertarget{class_qore_1_1_output_stream}{}\doxysection{Qore\+::Output\+Stream Class Reference}
\label{class_qore_1_1_output_stream}\index{Qore::OutputStream@{Qore::OutputStream}}


This class defines an abstract interface for output streams.  




{\ttfamily \#include $<$QC\+\_\+\+Output\+Stream.\+dox.\+h$>$}



Inheritance diagram for Qore\+::Output\+Stream\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_qore_1_1_output_stream__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_output_stream_a2125e17612767b9636554b282638e883}{close}} ()
\begin{DoxyCompactList}\small\item\em Flushes any buffered (unwritten) bytes, closes the output stream and releases all resources. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_output_stream_a451b37ada0ac9331fd2c62c68dcbe286}{constructor}} ()
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
abstract nothing \mbox{\hyperlink{class_qore_1_1_output_stream_a9054b0475c4829d10f956d8f6df6f2ac}{write}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} data)
\begin{DoxyCompactList}\small\item\em Writes bytes to the output stream. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class defines an abstract interface for output streams. 

Classes inheriting this class can be used to write bytes to files, sockets, memory etc.

\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_qore_1_1_stream_writer}{Stream\+Writer}} for a class that can be used to \mbox{\hyperlink{class_qore_1_1_output_stream_a9054b0475c4829d10f956d8f6df6f2ac}{write}} various kinds of data to an \mbox{\hyperlink{class_qore_1_1_output_stream}{Output\+Stream}}
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
stream classes are not designed to be accessed from multiple threads; they have been implemented without locking for fast and efficient use when used from a single thread. For methods that would be unsafe to use in another thread, any use of such methods in threads other than the thread where the constructor was called will cause a {\ttfamily STREAM-\/\+THREAD-\/\+ERROR} to be thrown, unless the stream is handed off to another thread using the \mbox{\hyperlink{class_qore_1_1_stream_base_a017fc847a42d5c670cb9640a94522666}{Stream\+Base\+::unassign\+Thread()}} method in the thread that currently owns the stream, and the \mbox{\hyperlink{class_qore_1_1_stream_base_ab6b33cb1944c46aca8e9984ddfd65452}{Stream\+Base\+::reassign\+Thread()}} method in the new thread.
\end{DoxyNote}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 
\end{DoxySince}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_output_stream_a2125e17612767b9636554b282638e883}\label{class_qore_1_1_output_stream_a2125e17612767b9636554b282638e883}} 
\index{Qore::OutputStream@{Qore::OutputStream}!close@{close}}
\index{close@{close}!Qore::OutputStream@{Qore::OutputStream}}
\doxysubsubsection{\texorpdfstring{close()}{close()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+Output\+Stream\+::close (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Flushes any buffered (unwritten) bytes, closes the output stream and releases all resources. 

Any methods called on a closed output stream will throw an exception. 

Implemented in \mbox{\hyperlink{class_qore_1_1_binary_output_stream_a660343ffb7925b59d56d822d3e201092}{Qore\+::\+Binary\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_encoding_conversion_output_stream_ae46c9f9987f43b585c0b79f67b698a12}{Qore\+::\+Encoding\+Conversion\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_file_output_stream_a40dc875e057e1820a81b4e6bcb22bb49}{Qore\+::\+File\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_pipe_output_stream_ac5c91f4c13fd56c359c02027c71ff3d3}{Qore\+::\+Pipe\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_stderr_output_stream_a6decdaa94621c01cf7ed49072a132a57}{Qore\+::\+Stderr\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_stdout_output_stream_ac343ce67083b91d78d59f6828e0be3fb}{Qore\+::\+Stdout\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_string_output_stream_a9e72b18135630529612c2a1ab88a9706}{Qore\+::\+String\+Output\+Stream}}, and \mbox{\hyperlink{class_qore_1_1_transform_output_stream_a98abc28f6c173a87aa3d17fd69d904c6}{Qore\+::\+Transform\+Output\+Stream}}.

\mbox{\Hypertarget{class_qore_1_1_output_stream_a451b37ada0ac9331fd2c62c68dcbe286}\label{class_qore_1_1_output_stream_a451b37ada0ac9331fd2c62c68dcbe286}} 
\index{Qore::OutputStream@{Qore::OutputStream}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::OutputStream@{Qore::OutputStream}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+Output\+Stream\+::constructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Constructor. 

Used by subclasses defined in the \mbox{\hyperlink{namespace_qore}{Qore}} programming language. \mbox{\Hypertarget{class_qore_1_1_output_stream_a9054b0475c4829d10f956d8f6df6f2ac}\label{class_qore_1_1_output_stream_a9054b0475c4829d10f956d8f6df6f2ac}} 
\index{Qore::OutputStream@{Qore::OutputStream}!write@{write}}
\index{write@{write}!Qore::OutputStream@{Qore::OutputStream}}
\doxysubsubsection{\texorpdfstring{write()}{write()}}
{\footnotesize\ttfamily abstract nothing Qore\+::\+Output\+Stream\+::write (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Writes bytes to the output stream. 


\begin{DoxyParams}{Parameters}
{\em data} & the data to write\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{os.write(<0405>);}

\end{DoxyCode}
 
\end{DoxyParagraph}


Implemented in \mbox{\hyperlink{class_qore_1_1_binary_output_stream_a3c73ee311cea8c73d7dc25c041fc98d4}{Qore\+::\+Binary\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_encoding_conversion_output_stream_a0b8b4433ed50a89b3b1b44d7305abb48}{Qore\+::\+Encoding\+Conversion\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_file_output_stream_a92bead81e08e4a855c35d313b85a59cd}{Qore\+::\+File\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_pipe_output_stream_ae3e794eea23aa086733f96aa54520e09}{Qore\+::\+Pipe\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_stderr_output_stream_ab458ac9540d1dad0fea5a991c6776890}{Qore\+::\+Stderr\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_stdout_output_stream_a83ad20353fe0e6333e41f9ace31ce802}{Qore\+::\+Stdout\+Output\+Stream}}, \mbox{\hyperlink{class_qore_1_1_string_output_stream_ab7ac16ba46cae914c70145b8fcb3f0b4}{Qore\+::\+String\+Output\+Stream}}, and \mbox{\hyperlink{class_qore_1_1_transform_output_stream_a76246b46d7e194e43a0e2dcc5161e1ae}{Qore\+::\+Transform\+Output\+Stream}}.

