\hypertarget{classFileByteStream}{\section{File\-Byte\-Stream Class Reference}
\label{classFileByteStream}\index{File\-Byte\-Stream@{File\-Byte\-Stream}}
}


An input file.  




{\ttfamily \#include $<$File\-Byte\-Stream.\-h$>$}

Inheritance diagram for File\-Byte\-Stream\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classFileByteStream}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classFileByteStream_a6e08e32d74fb38f6cdec3ae22ef1ccd7}{File\-Byte\-Stream} (string \&filename, string tryext=\char`\"{}\char`\"{}, bool preload=false)  throw (\-Input\-Byte\-Stream\-Error)
\begin{DoxyCompactList}\small\item\em Opens the requested file. \end{DoxyCompactList}\item 
\hyperlink{classFileByteStream_a795aa40f0e0126ff5ca8b487b8a84cc5}{$\sim$\-File\-Byte\-Stream} ()
\item 
void \hyperlink{classFileByteStream_af8dce2c1c84c3a1d5cedb74cf12f4245}{seek} (int pos)  throw (\-Input\-Byte\-Stream\-Error)
\begin{DoxyCompactList}\small\item\em Sets the position of the file pointer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
An input file. 



\subsection{Constructor \& Destructor Documentation}
\hypertarget{classFileByteStream_a6e08e32d74fb38f6cdec3ae22ef1ccd7}{\index{File\-Byte\-Stream@{File\-Byte\-Stream}!File\-Byte\-Stream@{File\-Byte\-Stream}}
\index{File\-Byte\-Stream@{File\-Byte\-Stream}!FileByteStream@{File\-Byte\-Stream}}
\subsubsection[{File\-Byte\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}File\-Byte\-Stream\-::\-File\-Byte\-Stream (
\begin{DoxyParamCaption}
\item[{string \&}]{filename, }
\item[{string}]{tryext = {\ttfamily \char`\"{}\char`\"{}}, }
\item[{bool}]{preload = {\ttfamily false}}
\end{DoxyParamCaption}
) throw  {\bf Input\-Byte\-Stream\-Error}) }}\label{classFileByteStream_a6e08e32d74fb38f6cdec3ae22ef1ccd7}


Opens the requested file. 

If preload is true, then open the file and read it entire into memory (possibly helpful if the client will be seeking a lot). If the file can't be opened, then try adding {\ttfamily tryext} to the end of it.

The file to be opened must be a seekable object -- that is, it must be a regular file, rather than a named pipe or a socket. The constructor checks this, and throws an exception if this is not the case. If you wish to open a named pipe, you can do so using \hyperlink{classInputByteStream_a72842f8f4ed32b81a7717d3d572bb6f8}{Input\-Byte\-Stream\#\-Input\-Byte\-Stream(string)}.


\begin{DoxyParams}{Parameters}
{\em filename} & the file to be opened \\
\hline
{\em tryext} & a file extension, including any dot, which should be added to the end of {\ttfamily filename} if that cannot be opened; default {\ttfamily \char`\"{}\char`\"{}} suppresses this \\
\hline
{\em preload} & if true, then the file is read entirely into memory\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classInputByteStreamError}{Input\-Byte\-Stream\-Error}} & if there is a problem opening the file, including the discovery that it is not a seekable object \\
\hline
\end{DoxyExceptions}


References normal.

\hypertarget{classFileByteStream_a795aa40f0e0126ff5ca8b487b8a84cc5}{\index{File\-Byte\-Stream@{File\-Byte\-Stream}!$\sim$\-File\-Byte\-Stream@{$\sim$\-File\-Byte\-Stream}}
\index{$\sim$\-File\-Byte\-Stream@{$\sim$\-File\-Byte\-Stream}!FileByteStream@{File\-Byte\-Stream}}
\subsubsection[{$\sim$\-File\-Byte\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}File\-Byte\-Stream\-::$\sim$\-File\-Byte\-Stream (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{classFileByteStream_a795aa40f0e0126ff5ca8b487b8a84cc5}


\subsection{Member Function Documentation}
\hypertarget{classFileByteStream_af8dce2c1c84c3a1d5cedb74cf12f4245}{\index{File\-Byte\-Stream@{File\-Byte\-Stream}!seek@{seek}}
\index{seek@{seek}!FileByteStream@{File\-Byte\-Stream}}
\subsubsection[{seek}]{\setlength{\rightskip}{0pt plus 5cm}void File\-Byte\-Stream\-::seek (
\begin{DoxyParamCaption}
\item[{int}]{pos}
\end{DoxyParamCaption}
) throw  {\bf Input\-Byte\-Stream\-Error}) }}\label{classFileByteStream_af8dce2c1c84c3a1d5cedb74cf12f4245}


Sets the position of the file pointer. 


\begin{DoxyParams}{Parameters}
{\em pos} & if positive, the offset from the beginning of the file; if negative, the offset from the end of the file\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{classInputByteStreamError}{Input\-Byte\-Stream\-Error}} & if the offset is larger than the size of the file \\
\hline
\end{DoxyExceptions}


References normal.



The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{FileByteStream_8h}{File\-Byte\-Stream.\-h}\item 
\hyperlink{FileByteStream_8cc}{File\-Byte\-Stream.\-cc}\end{DoxyCompactItemize}
