FBufferWriter

Similar to [FMemoryWriter](API\Runtime\Core\Serialization\FMemoryWriter), but able to internally manage the memory for the buffer.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FArchiveState

FArchive

FBufferWriter

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Serialization/BufferWriter.h

Include

#include "Serialization/BufferWriter.h"

Syntax

class FBufferWriter : public FArchive

Remarks

Similar to FMemoryWriter, but able to internally manage the memory for the buffer.

Variables

Name Description

Protected variable

bool

 

bAllowResize

Protected variable

bool

 

bFreeOnClose

Protected variable

void *

 

WriterData

Protected variable

int64

 

WriterPos

Protected variable

int64

 

WriterSize

Constructors

Name Description

Public function

FBufferWriter

(
    void* Data,
    int64 Size,
    EBufferWriterFlags InFlags
)

Constructor

Destructors

Name Description

Public function

~FBufferWriter()

Functions

Name Description

Public function

void *

 

GetWriterData()

Overridden from FArchive

Name Description

Public function Virtual

bool

 

Close()

Attempts to close and finalize any handles used for backing data storage, returns true if it succeeded.

Public function Virtual

void

 

Seek

(
    int64 InPos
)

Attempts to set the current offset into backing data storage, this will do nothing if there is no storage.

Public function Virtual

void

 

Serialize

(
    void* Data,
    int64 Num
)

Overridden from FArchiveState

Name Description

Public function Virtual

bool

 

AtEnd()

Returns true if the current location within the backing data storage is at the end, always returns false if there is no storage.

Public function Virtual Const

FString

 

GetArchiveName()

Returns the name of the Archive.

Public function Virtual

int64

 

Tell()

Returns the current location within the backing data storage, which can possibly be passed to Seek later to restore a read/write location.

Public function Virtual

int64

 

TotalSize()

Returns total size of the backing data storage.