|
|
@ -169,20 +169,20 @@ Stream::Stream(int _mode)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
setDevice(&buf);
|
|
|
|
setDevice(&buf);
|
|
|
|
Q_ASSERT( _mode==IO_ReadOnly || _mode==IO_WriteOnly );
|
|
|
|
Q_ASSERT( _mode==IO_ReadOnly || _mode==IO_WriteOnly );
|
|
|
|
buf.open((TQIODevice_OpenModeFlag)_mode);
|
|
|
|
buf.open(_mode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Stream::clear()
|
|
|
|
void Stream::clear()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
buf.close();
|
|
|
|
buf.close();
|
|
|
|
buf.open((TQIODevice_OpenModeFlag)(mode | IO_Truncate));
|
|
|
|
buf.open(mode | IO_Truncate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Stream::setArray(TQByteArray a)
|
|
|
|
void Stream::setArray(TQByteArray a)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
buf.close();
|
|
|
|
buf.close();
|
|
|
|
buf.setBuffer(a);
|
|
|
|
buf.setBuffer(a);
|
|
|
|
buf.open((TQIODevice_OpenModeFlag)mode);
|
|
|
|
buf.open(mode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool ReadingStream::readOk()
|
|
|
|
bool ReadingStream::readOk()
|
|
|
|