📄 bfile.h
字号:
#ifndef __BFILE_H_
#define __BFILE_H_
#include <string>
#include "ocicpp.h"
#include "OraError.h"
using std::string;
namespace OCICPP {
class BFile {
private:
OCILobLocator *lob;
OCIError *errhp;
OCISvcCtx *svchp;
LobType type; /* BFILE */
unsigned len; /* Overall length */
unsigned offset; /* Current offset default 1 */
bool needLobFree;
public:
BFile();
BFile(OCISvcCtx *svcctx,OCILobLocator *lob_desc,OCIError *err);
void init(OCISvcCtx *svcctx,OCILobLocator *lob_desc,OCIError *err);
void init(OCIEnv *env,OCISvcCtx *,OCIError *err,const string &dir,const string &fname);
~BFile();
void drop();
void seek(unsigned offset,LobDirection dir); /* Set's the current position
dir is OCICPP::LOB_SET or OCICPP::LOB_CUR or OCICPP::LOB_END
similair to stdc seek call
*/
unsigned tell();
void open();
void close();
unsigned read(void *buff,int blen); /* returns number of bytes or chracters actually read
if offset -1 use internal offset set by seek
*/
unsigned getLen() const;
friend class Lob;
friend class TLob;
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -