class · System

ResourceData

public class System.ResourceData : System.Any

Read-only bytes of a resource, read in place from the program's static data (no copy): indexed, iterated, sliced.

Kind
class
Namespace
System
Assembly
System.Core
Access
public, final
Source file
Resources.ant

Inheritance

Base classes
Any ResourceData

Properties

property Length: i32
#

read-only

How many bytes.

Methods

method At(index: i32) -> u8
#

The byte at index (data[index]).

method ToArray() -> u8[]
#

A copy of the bytes.

method Text() -> System.String<u8>
#

The bytes as UTF-8 text.

method Iterator() -> System.ResourceIterator
#

The bytes in order (loop (u8 b in data)).

method Slice(start: i32, count: i32) -> System.ResourceData
#

count bytes from start, in place (no copy).

method Slice(start: i32) -> System.ResourceData
#

The bytes from start on, in place.

method Equals(bytes: u8[]) -> bool
#

Whether these are the same bytes as bytes (one comparison in memory).

Operators and conversions

static operator $op_Equal(a: System.ResourceData, b: u8[]) -> bool
#

static

static operator $op_NotEqual(a: System.ResourceData, b: u8[]) -> bool
#

static

static operator $op_Equal(a: u8[], b: System.ResourceData) -> bool
#

static

static operator $op_NotEqual(a: u8[], b: System.ResourceData) -> bool
#

static

Private and internal members (3)

field data: u8*
#

private

field length: i32
#

private

constructor ResourceData(data: u8*, length: i32)
#

internal

Inherited members (5)

Source

ResourceData as Larva HIR, decompiled from its Larva HIR.

System.ResourceData.hir
// Read-only bytes of a resource, read in place from the program's static data (no copy): indexed, iterated, sliced.
public class System.ResourceData : System.Any
{
    field data: u8*
    field length: i32
    constructor ResourceData(data: u8*, length: i32)
    // The byte at `index` (`data[index]`).
    method At(index: i32) -> u8
    // A copy of the bytes.
    method ToArray() -> u8[]
    // The bytes as UTF-8 text.
    method Text() -> System.String<u8>
    // The bytes in order (`loop (u8 b in data)`).
    method Iterator() -> System.ResourceIterator
    // `count` bytes from `start`, in place (no copy).
    method Slice(start: i32, count: i32) -> System.ResourceData
    // The bytes from `start` on, in place.
    method Slice(start: i32) -> System.ResourceData
    // Whether these are the same bytes as `bytes` (one comparison in memory).
    method Equals(bytes: u8[]) -> bool
    static operator $op_Equal(a: System.ResourceData, b: u8[]) -> bool
    static operator $op_NotEqual(a: System.ResourceData, b: u8[]) -> bool
    static operator $op_Equal(a: u8[], b: System.ResourceData) -> bool
    static operator $op_NotEqual(a: u8[], b: System.ResourceData) -> bool
    // How many bytes.
    property Length: i32
}
Esc