Class WasmTarget
java.lang.Object
de.inetsoftware.jwebassembly.module.WasmTarget
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Fileprivate Writerprivate OutputStreamprivate Writerprivate Appendable -
Constructor Summary
ConstructorsConstructorDescriptionWasmTarget(File file) Create a target with a file.WasmTarget(OutputStream output) Create a target with an OutputStreamWasmTarget(Appendable output) Create a target with an Appendable for text export -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close all streamsprivate StringGet the base name without extension.Get the output for the JavaScript glue code.Get the source map OutputStreamGet the URL for the source mapping that should be write into the assembly.Get the output for the text format.Get the wasm OutputStream
-
Field Details
-
file
-
output
-
textOutput
-
sourceMap
-
javaScript
-
-
Constructor Details
-
WasmTarget
-
WasmTarget
Create a target with an OutputStream- Parameters:
output- the stream for the wasm file
-
WasmTarget
Create a target with an Appendable for text export- Parameters:
output- the stream for the wasm file
-
-
Method Details
-
getWasmOutput
Get the wasm OutputStream- Returns:
- the stream
- Throws:
IOException- if any I/O error occur
-
getTextOutput
Get the output for the text format.- Returns:
- the target
- Throws:
IOException- if any I/O error occur
-
getSourceMappingURL
-
getSourceMapOutput
Get the source map OutputStream- Returns:
- the stream
- Throws:
IOException- if any I/O error occur
-
getJavaScriptOutput
Get the output for the JavaScript glue code.- Returns:
- the script output.
- Throws:
IOException- if any I/O error occur
-
getBaseWasmFile
-
close
Close all streams- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- if any I/O error occur
-