Class SmartStream
Inheritance
System.Object
SmartStream
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
Declaration
public SmartStreamType StreamType { get; }
Property Value
Methods
|
Improve this Doc
View Source
Assign(SmartStream)
Declaration
public void Assign(SmartStream source)
Parameters
|
Improve this Doc
View Source
CreateMemory()
Declaration
public static SmartStream CreateMemory()
Returns
|
Improve this Doc
View Source
CreateMemory(Byte[])
Declaration
public static SmartStream CreateMemory(byte[] buffer)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
Returns
|
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
|
Improve this Doc
View Source
CreateNull()
Declaration
public static SmartStream CreateNull()
Returns
|
Improve this Doc
View Source
CreateReference()
Create a new reference to the backing stream.
Declaration
public SmartStream CreateReference()
Returns
|
Improve this Doc
View Source
CreateTemp()
Declaration
public static SmartStream CreateTemp()
Returns
|
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
|
Improve this Doc
View Source
OpenRead(String)
Declaration
public static SmartStream OpenRead(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
|
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
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 |
|