Show / Hide Table of Contents

Class SmartStream

Inheritance
System.Object
SmartStream
Namespace: AssetRipper.IO.Files.Streams.Smart
Assembly: AssetRipper.IO.Files.dll
Syntax
public sealed class SmartStream : Stream

Properties

| Improve this Doc View Source

CanRead

Declaration
public override bool CanRead { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CanSeek

Declaration
public override bool CanSeek { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

CanWrite

Declaration
public override bool CanWrite { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

IsNull

If true, this has no backing stream.

Declaration
public bool IsNull { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Length

Declaration
public override long Length { get; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

Position

Declaration
public override long Position { get; set; }
Property Value
Type Description
System.Int64
| Improve this Doc View Source

RefCount

The number of references to the backing stream.

Declaration
public int RefCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

StreamType

The type of stream backing this SmartStream.

Declaration
public SmartStreamType StreamType { get; }
Property Value
Type Description
SmartStreamType

Methods

| Improve this Doc View Source

Assign(SmartStream)

Copy the reference from another SmartStream.

Declaration
public void Assign(SmartStream source)
Parameters
Type Name Description
SmartStream source

The SmartStream to copy a reference from.

| Improve this Doc View Source

CreateMemory()

Declaration
public static SmartStream CreateMemory()
Returns
Type Description
SmartStream
| Improve this Doc View Source

CreateMemory(Byte[])

Declaration
public static SmartStream CreateMemory(byte[] buffer)
Parameters
Type Name Description
System.Byte[] buffer
Returns
Type Description
SmartStream
| Improve this Doc View Source

CreateMemory(Byte[], Int32, Int32, Boolean)

Declaration
public static SmartStream CreateMemory(byte[] buffer, int offset, int size, bool writable = true)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 size
System.Boolean writable
Returns
Type Description
SmartStream
| Improve this Doc View Source

CreateNull()

Create a SmartStream with no backing stream.

Declaration
public static SmartStream CreateNull()
Returns
Type Description
SmartStream

A new SmartStream for which IsNull is true.

| Improve this Doc View Source

CreateReference()

Create a new reference to the backing stream.

Declaration
public SmartStream CreateReference()
Returns
Type Description
SmartStream

A new SmartStream that references the same stream as langword_csharp_this.

| Improve this Doc View Source

CreateTemp()

Declaration
public static SmartStream CreateTemp()
Returns
Type Description
SmartStream
| Improve this Doc View Source

Dispose(Boolean)

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
| Improve this Doc View Source

Flush()

Declaration
public override void Flush()
| Improve this Doc View Source

FreeReference()

Free the reference to the backing stream and become null.

Declaration
public void FreeReference()
| Improve this Doc View Source

Move(SmartStream)

Move the reference from another SmartStream to langword_csharp_this.

Declaration
public void Move(SmartStream source)
Parameters
Type Name Description
SmartStream source

The SmartStream from which to move the reference.

Remarks

The reference for source is freed.

| Improve this Doc View Source

OpenRead(String)

Declaration
public static SmartStream OpenRead(string path)
Parameters
Type Name Description
System.String path
Returns
Type Description
SmartStream
| Improve this Doc View Source

Read(Span<Byte>)

Declaration
public override int Read(Span<byte> buffer)
Parameters
Type Name Description
Span<System.Byte> buffer
Returns
Type Description
System.Int32
| Improve this Doc View Source

Read(Byte[], Int32, Int32)

Declaration
public override int Read(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 count
Returns
Type Description
System.Int32
| Improve this Doc View Source

ReadByte()

Declaration
public override int ReadByte()
Returns
Type Description
System.Int32
| Improve this Doc View Source

Seek(Int64, SeekOrigin)

Declaration
public override long Seek(long offset, SeekOrigin origin)
Parameters
Type Name Description
System.Int64 offset
SeekOrigin origin
Returns
Type Description
System.Int64
| Improve this Doc View Source

SetLength(Int64)

Declaration
public override void SetLength(long value)
Parameters
Type Name Description
System.Int64 value
| Improve this Doc View Source

ToArray()

Write the contents to a byte array, regardless of the Position property.

Declaration
public byte[] ToArray()
Returns
Type Description
System.Byte[]

A new byte array.

| Improve this Doc View Source

Write(Byte[], Int32, Int32)

Declaration
public override void Write(byte[] buffer, int offset, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 offset
System.Int32 count
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾