inputstream.h

来自「一个symbian 冒险游戏代码」· C头文件 代码 · 共 55 行

H
55
字号
#ifndef _IO_INPUTSTREAM_H
#define _IO_INPUTSTREAM_H


#include <lang/String.h>
#include <lang/Object.h>


namespace io
{


/**
 * Base class of all input stream classes.
 *
 * @ingroup io
 */
class InputStream :
	public lang::Object
{
public:
	virtual ~InputStream() {}

	/**
	 * Tries to read specified number of bytes from the stream.
	 * Doesn't block the caller if specified number of bytes isn't available.
	 * @return Number of bytes actually read.
	 * @exception IOException
	 */
	virtual int				read( void* data, int size ) = 0;

	/**
	 * Tries to skip over n bytes from the stream.
	 * @return Number of bytes actually skipped.
	 * @exception IOException
	 */
	virtual int				skip( int n );

	/** 
	 * Returns the number of bytes that can be read from the stream without blocking.
	 * @exception IOException
	 */
	virtual int				available() const = 0;

	virtual lang::String	toString() const	{return "InputStream";}
};


} // io


#endif // _IO_INPUTSTREAM_H


⌨️ 快捷键说明

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