Class TMemoryFileStream

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMemoryFileStream = class(TMemoryStream)

Description

Simple file mapped into the memory. This is a TMemoryStream descendant that at construction loads it's contents from file, and (if not ReadOnly) at the destruction saves it's contents into the same file.

This allows for full stream capabilities, very fast seeking in all direction, you can seek and read freely, as the whole thing is buffered in memory. However, it wastes a lot of memory — don't use this for large files.

You shouldn't use LoadFromFile/SaveToFile methods. Although this class is actually so simple that it won't break anything. But you should be aware of what you are doing, i.e. you can possibly break connection between FileName property and actual contents of the stream.

Hierarchy

  • TMemoryStream
  • TMemoryFileStream

Overview

Methods

Public constructor Create(const AFileName: string; AReadOnly: boolean);
Public destructor Destroy; override;

Properties

Public property FileName: string read FFileName;

Description

Methods

Public constructor Create(const AFileName: string; AReadOnly: boolean);
 
Public destructor Destroy; override;
 

Properties

Public property FileName: string read FFileName;
 

Generated by PasDoc 0.12.1 on 2013-02-04 20:26:49