00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(BINFILEINPUTSTREAM_HPP)
00022 #define BINFILEINPUTSTREAM_HPP
00023
00024 #include <xercesc/util/BinInputStream.hpp>
00025 #include <xercesc/util/PlatformUtils.hpp>
00026
00027 XERCES_CPP_NAMESPACE_BEGIN
00028
00029 class BinFileInputStream : public BinInputStream
00030 {
00031 public :
00032
00033
00034
00035 BinFileInputStream
00036 (
00037 const XMLCh* const fileName
00038 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00039 );
00040
00041 BinFileInputStream
00042 (
00043 const char* const fileName
00044 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00045 );
00046
00047 BinFileInputStream
00048 (
00049 const FileHandle toUse
00050 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00051 );
00052
00053 virtual ~BinFileInputStream();
00054
00055
00056
00057
00058
00059 bool getIsOpen() const;
00060 unsigned int getSize() const;
00061 void reset();
00062
00063
00064
00065
00066
00067 virtual unsigned int curPos() const;
00068
00069 virtual unsigned int readBytes
00070 (
00071 XMLByte* const toFill
00072 , const unsigned int maxToRead
00073 );
00074
00075
00076 private :
00077
00078
00079
00080 BinFileInputStream(const BinFileInputStream&);
00081 BinFileInputStream& operator=(const BinFileInputStream&);
00082
00083
00084
00085
00086
00087
00088
00089
00090 FileHandle fSource;
00091 MemoryManager* const fMemoryManager;
00092 };
00093
00094
00095
00096
00097
00098 inline bool BinFileInputStream::getIsOpen() const
00099 {
00100 return (fSource != (FileHandle) XERCES_Invalid_File_Handle);
00101 }
00102
00103 XERCES_CPP_NAMESPACE_END
00104
00105 #endif