C# 클래스 TagTool.Cache.ResourceDataManager

Manages resource caches and extracting/injecting resource data.
파일 보기 프로젝트 열기: TheGuardians/TagTool 1 사용 예제들

공개 메소드들

메소드 설명
Add ( ResourceReference resource, ResourceLocation location, Stream dataStream ) : void

Adds a new resource to a cache.

AddRaw ( ResourceReference resource, ResourceLocation location, byte data ) : void

Adds raw, pre-compressed resource data to a cache.

Extract ( ResourceReference resource, Stream outStream ) : void

Extracts and decompresses the data for a resource.

ExtractRaw ( ResourceReference resource ) : byte[]

Extracts raw, compressed resource data.

LoadCache ( ResourceLocation location, string path ) : void

Loads a resource cache from a file.

LoadCacheFromDirectory ( string directory, ResourceLocation cache ) : void

Loads a resource cache from a directory using its default name.

LoadCachesFromDirectory ( string directory ) : void

Loads resource caches from a directory using their default filenames.

Replace ( ResourceReference resource, Stream dataStream ) : void

Compresses and replaces the data for a resource.

ReplaceRaw ( ResourceReference resource, byte data ) : void

Replaces a resource with raw, pre-compressed data.

비공개 메소드들

메소드 설명
GetCache ( ResourceReference resource ) : LoadedCache

메소드 상세

Add() 공개 메소드

Adds a new resource to a cache.
resource The input stream is not open for reading;dataStream
public Add ( ResourceReference resource, ResourceLocation location, Stream dataStream ) : void
resource ResourceReference The resource reference to initialize.
location ResourceLocation The location where the resource should be stored.
dataStream Stream The stream to read the resource data from.
리턴 void

AddRaw() 공개 메소드

Adds raw, pre-compressed resource data to a cache.
public AddRaw ( ResourceReference resource, ResourceLocation location, byte data ) : void
resource ResourceReference The resource reference to initialize.
location ResourceLocation The location where the resource should be stored.
data byte The pre-compressed data to store.
리턴 void

Extract() 공개 메소드

Extracts and decompresses the data for a resource.
Thrown if the output stream is not open for writing. Thrown if the file containing the resource has not been loaded.
public Extract ( ResourceReference resource, Stream outStream ) : void
resource ResourceReference The resource.
outStream Stream The stream to write the extracted data to.
리턴 void

ExtractRaw() 공개 메소드

Extracts raw, compressed resource data.
public ExtractRaw ( ResourceReference resource ) : byte[]
resource ResourceReference The resource.
리턴 byte[]

LoadCache() 공개 메소드

Loads a resource cache from a file.
Thrown if the cache is already loaded.
public LoadCache ( ResourceLocation location, string path ) : void
location ResourceLocation The resource cache type.
path string The path to the .dat file to read.
리턴 void

LoadCacheFromDirectory() 공개 메소드

Loads a resource cache from a directory using its default name.
public LoadCacheFromDirectory ( string directory, ResourceLocation cache ) : void
directory string The directory to find the cache in.
cache ResourceLocation The type of cache to load.
리턴 void

LoadCachesFromDirectory() 공개 메소드

Loads resource caches from a directory using their default filenames.
public LoadCachesFromDirectory ( string directory ) : void
directory string The directory to find files in.
리턴 void

Replace() 공개 메소드

Compresses and replaces the data for a resource.
Thrown if the input stream is not open for reading.
public Replace ( ResourceReference resource, Stream dataStream ) : void
resource ResourceReference The resource whose data should be replaced. On success, the reference will be adjusted to account for the new data.
dataStream Stream The stream to read the new data from.
리턴 void

ReplaceRaw() 공개 메소드

Replaces a resource with raw, pre-compressed data.
public ReplaceRaw ( ResourceReference resource, byte data ) : void
resource ResourceReference The resource whose data should be replaced. On success, the reference will be adjusted to account for the new data.
data byte The raw, pre-compressed data to use.
리턴 void