Struct PackedBinaryStream
Output stream for deserialization. This stream is used to retain relevant data parsed during deserialization.
Inherited Members
Namespace: Unity.Serialization.Json
Assembly: Unity.Serialization.dll
Syntax
public struct PackedBinaryStream : IDisposable, IEquatable<PackedBinaryStream>
Remarks
The contents of the stream are not actualized and instead remain as a string of characters.
Constructors
PackedBinaryStream(int, int, Allocator)
Constructs a new instance of PackedBinaryStream using the given capacities.
Declaration
public PackedBinaryStream(int initialTokensCapacity, int initialBufferCapacity, Allocator label)
Parameters
| Type | Name | Description |
|---|---|---|
| int | initialTokensCapacity | Initial number of tokens to allocate. |
| int | initialBufferCapacity | Initial buffer size to allocate. |
| Allocator | label | Allocator to use for internal buffers. |
PackedBinaryStream(Allocator)
Constructs a new instance of PackedBinaryStream using default capacities.
Declaration
public PackedBinaryStream(Allocator label)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | label | The memory allocator label to use. |
Methods
Clear()
Clears all token and buffer data.
Declaration
public void Clear()
Dispose()
Releases all resources used by the PackedBinaryStream.
Declaration
public void Dispose()
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
Equals(PackedBinaryStream)
Declaration
public bool Equals(PackedBinaryStream other)
Parameters
| Type | Name | Description |
|---|---|---|
| PackedBinaryStream | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |