⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jfileinputstream.h

📁 b tree code for index in the database design
💻 H
字号:
//////////////////////////////////////////////////////////////////
///
/// (C) 2007: Yuriy Soroka <ysoroka@scalingweb.com>
///	      Anton Fedoruk <afedoruk@scalingweb.com>
///
//////////////////////////////////////////////////////////////////

#ifndef __FileInputStream_h__
#define __FileInputStream_h__

#include "JInputStream.h"
#include <QString>
#include <QFile>
#include <QByteArray>
#include "JUtils.h"

#ifdef WIN32
#include "windows.h"
#endif // WIN32

/// Class JFileInputStream

class JSTREAM_EXPORT JFileInputStream : public JInputStream
{
public:

	JFileInputStream();
	JFileInputStream(const QFile& file);
	JFileInputStream(const QString& name);
	~JFileInputStream();

	virtual gint64 size();
	virtual void close();

	using JInputStream::read; 	// unhide inherited read methods

	virtual gint64 read(char* pBuffer, gint64 bufLen);
	virtual gint64 readLine( char* data, gint64 maxSize );
	virtual QByteArray readLine();

	virtual bool atEnd() const;

	virtual bool seek( gint64 position );
	virtual gint64 pos() const;
	virtual void reset();

	time_t lastModified() const;

	bool open(const QString& fileName);

private:
	JFileInputStream(const JFileInputStream& rhs);            // cannot be copied
	JFileInputStream& operator=(const JFileInputStream& rhs); // nor assigned

#ifdef WIN32
	HANDLE hFile_;
#else
	QFile File_;
#endif // WIN32

};

#endif // __FileInputStream_h__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -