Class BinaryWriter
- java.lang.Object
-
- de.mirkosertic.bytecoder.core.backend.wasm.ast.BinaryWriter
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class BinaryWriter extends java.lang.Object implements java.lang.AutoCloseable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classBinaryWriter.BlockWriterclassBinaryWriter.SectionWriterclassBinaryWriter.Writer
-
Field Summary
Fields Modifier and Type Field Description private java.io.ByteArrayOutputStreamos
-
Constructor Summary
Constructors Constructor Description BinaryWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()BinaryWriter.SectionWritercodeSection()BinaryWriter.SectionWritercustomSection()BinaryWriter.SectionWriterelementsSection()BinaryWriter.SectionWriterexportsSection()BinaryWriter.SectionWriterfunctionSection()BinaryWriter.SectionWriterglobalsSection()voidheader()BinaryWriter.SectionWriterimportsSection()BinaryWriter.SectionWritermemorySection()BinaryWriter.SectionWritertablesSection()BinaryWriter.SectionWritertagSection()byte[]toByteArray()BinaryWriter.SectionWritertypeSection()private static intwriteSignedLeb128(int value, java.io.OutputStream os)private static intwriteSignedLeb128(long value, java.io.OutputStream os)private static intwriteUnsignedLeb128(int value, java.io.OutputStream os)
-
-
-
Method Detail
-
writeUnsignedLeb128
private static int writeUnsignedLeb128(int value, java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
writeSignedLeb128
private static int writeSignedLeb128(int value, java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
writeSignedLeb128
private static int writeSignedLeb128(long value, java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
toByteArray
public byte[] toByteArray() throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException
-
header
public void header() throws java.io.IOException- Throws:
java.io.IOException
-
typeSection
public BinaryWriter.SectionWriter typeSection()
-
importsSection
public BinaryWriter.SectionWriter importsSection()
-
functionSection
public BinaryWriter.SectionWriter functionSection()
-
tablesSection
public BinaryWriter.SectionWriter tablesSection()
-
memorySection
public BinaryWriter.SectionWriter memorySection()
-
globalsSection
public BinaryWriter.SectionWriter globalsSection()
-
exportsSection
public BinaryWriter.SectionWriter exportsSection()
-
elementsSection
public BinaryWriter.SectionWriter elementsSection()
-
codeSection
public BinaryWriter.SectionWriter codeSection()
-
tagSection
public BinaryWriter.SectionWriter tagSection()
-
customSection
public BinaryWriter.SectionWriter customSection()
-
-