📄 eb_binreader.h
字号:
/***************************************************************************
EB_BinReader.h -
-------------------
begin : Mon Mar 22 2004
copyright : (C) 2004 by DigitalAirways
email : info@digitalairways.com
***************************************************************************/
/*
* Copyright (c) 2000-2004 DigitalAirways, sarl. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
*/
/*
**************************************************************
* TODO
**************************************************************
-
**************************************************************
* HISTORY
**************************************************************
- This component is designed to read a stream of Java serialized objects.
*/
#ifndef __EB_BINREADER__
#define __EB_BINREADER__
#include "EB_Utils.h"
/*
short STREAM_MAGIC = (short)0xaced;
short STREAM_VERSION = 0x0005;
byte TC_NULL = (byte)0x70;
byte TC_REFERENCE = (byte)0x71;
byte TC_CLASSDESC = (byte)0x72;
byte TC_OBJECT = (byte)0x73;
byte TC_STRING = (byte)0x74;
byte TC_ARRAY = (byte)0x75;
byte TC_CLASS = (byte)0x76;
byte TC_BLOCKDATA = (byte)0x77;
byte TC_ENDBLOCKDATA = (byte)0x78;
byte TC_RESET = (byte)0x79;
byte TC_BLOCKDATALONG = (byte)0x7A;
byte TC_EXCEPTION = (byte)0x7B;
byte TC_LONGSTRING = (byte) 0x7C;
byte TC_PROXYCLASSDESC = (byte) 0x7D;
int baseWireHandle = 0x7E0000;
*/
#define TAG_STRING 0x74
#define TAG_BLOCK 0x77
// Block control must be defined to read files generated by an object serializer.
//#define BLOCK_CONTROL
class KREBDLIBS_API BinReader {
private:
unsigned char* memoryInputScan ;
unsigned char* memoryInputEnd ;
int currentBlockLen ;
unsigned char tmp[100] ;
//
int checkCurrentBlock(int len2read);
public:
DEFINE_NEW(BinReader);
DEFINE_DELETE(BinReader);
BinReader(unsigned char* memData, int memLen);
~BinReader() ;
void readData(void* to, int len);
int isOpen() ;
long readLong() ;
char readChar() ;
char readBoolean() ;
static unsigned char* convertUTFtoISO(unsigned char* in) ;
unsigned char* readString(int newMem=false) ;
} ;
#endif // ndef __EB_BINREADER__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -