Object FileReaderFactory
-
- All Implemented Interfaces:
public class FileReaderFactory
-
-
Field Summary
Fields Modifier and Type Field Description public final static FileReaderFactoryINSTANCE
-
Method Summary
Modifier and Type Method Description final FileReaderfromMemory(ByteArray manifest, ByteArray wasmModule, FileReader baseFileReader)Creates a FileReader that reads files from memory. final FileReaderfromManifest(ByteArray manifest, FileReader baseFileReader)Creates a FileReader that reads files from memory. final FileReaderfromWasmModule(ByteArray wasmModule, FileReader baseFileReader)Creates a FileReader that reads files from memory. -
-
Method Detail
-
fromMemory
final FileReader fromMemory(ByteArray manifest, ByteArray wasmModule, FileReader baseFileReader)
Creates a FileReader that reads files from memory. The manifest and wasmModule parameters are the content of the manifest and wasm module files respectively. The baseFileReader parameter is an optional FileReader that will be used to read files that are not the manifest or wasm module. If baseFileReader is not specified, then an error will be returned when a file other than the manifest or wasm module is read.
- Parameters:
manifest- The content of the manifest file.wasmModule- The content of the wasm module file.baseFileReader- An optional FileReader that will be used to read files that are not the manifest or wasm module.
-
fromManifest
final FileReader fromManifest(ByteArray manifest, FileReader baseFileReader)
Creates a FileReader that reads files from memory. The manifest parameter is the content of the manifest file. The baseFileReader parameter is an optional FileReader that will be used to read files that are not the manifest. If baseFileReader is not specified, then an error will be returned when a file other than the manifest is read.
- Parameters:
manifest- The content of the manifest file.baseFileReader- An optional FileReader that will be used to read files that are not the manifest.
-
fromWasmModule
final FileReader fromWasmModule(ByteArray wasmModule, FileReader baseFileReader)
Creates a FileReader that reads files from memory. The wasmModule parameter is the content of the wasm module file. The baseFileReader parameter is an optional FileReader that will be used to read files that are not the wasm module. If baseFileReader is not specified, then an error will be returned when a file other than the wasm module is read.
- Parameters:
wasmModule- The content of the wasm module file.baseFileReader- An optional FileReader that will be used to read files that are not the wasm module.
-
-
-
-