\hypertarget{classFileByteStream}{
\section{File\-Byte\-Stream Class Reference}
\label{classFileByteStream}\index{FileByteStream@{FileByteStream}}
}
{\tt \#include $<$File\-Byte\-Stream.h$>$}

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


\subsection{Constructor \& Destructor Documentation}
\hypertarget{classFileByteStream_a0}{
\index{FileByteStream@{File\-Byte\-Stream}!FileByteStream@{FileByteStream}}
\index{FileByteStream@{FileByteStream}!FileByteStream@{File\-Byte\-Stream}}
\subsubsection[FileByteStream]{\setlength{\rightskip}{0pt plus 5cm}File\-Byte\-Stream::File\-Byte\-Stream (string \& {\em filename}, string {\em tryext} = {\tt \char`\"{}\char`\"{}}, bool {\em preload} = {\tt false})  throw (\hyperlink{classInputByteStreamError}{Input\-Byte\-Stream\-Error})}}
\label{classFileByteStream_a0}


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 {\tt 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_a1}{Input\-Byte\-Stream\#Input\-Byte\-Stream(string)}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]the file to be opened \item[{\em tryext}]a file extension, including any dot, which should be added to the end of {\tt filename} if that cannot be opened; default {\tt \char`\"{}\char`\"{}} suppresses this \item[{\em preload}]if true, then the file is read entirely into memory\end{description}
\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em Input\-Byte\-Stream\-Error}]if there is a problem opening the file, including the discovery that it is not a seekable object \end{description}
\end{Desc}
\hypertarget{classFileByteStream_a1}{
\index{FileByteStream@{File\-Byte\-Stream}!~FileByteStream@{$\sim$FileByteStream}}
\index{~FileByteStream@{$\sim$FileByteStream}!FileByteStream@{File\-Byte\-Stream}}
\subsubsection[$\sim$FileByteStream]{\setlength{\rightskip}{0pt plus 5cm}File\-Byte\-Stream::$\sim$\hyperlink{classFileByteStream}{File\-Byte\-Stream} ()}}
\label{classFileByteStream_a1}




\subsection{Member Function Documentation}
\hypertarget{classFileByteStream_a2}{
\index{FileByteStream@{File\-Byte\-Stream}!seek@{seek}}
\index{seek@{seek}!FileByteStream@{File\-Byte\-Stream}}
\subsubsection[seek]{\setlength{\rightskip}{0pt plus 5cm}void File\-Byte\-Stream::seek (int {\em pos})  throw (\hyperlink{classInputByteStreamError}{Input\-Byte\-Stream\-Error})}}
\label{classFileByteStream_a2}


Sets the position of the file pointer. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pos}]if positive, the offset from the beginning of the file; if negative, the offset from the end of the file\end{description}
\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em Input\-Byte\-Stream\-Error}]if the offset is larger than the size of the file \end{description}
\end{Desc}


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