java.lang.Object
dev.argon.esexpr.ESExprBinaryWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds a string table from expressions. -
Constructor Summary
ConstructorsConstructorDescriptionESExprBinaryWriter(@NotNull List<? extends @NotNull String> symbolTable, OutputStream os) Creates an encoder. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull StringTablebuildSymbolTable(@NotNull ESExpr expr) Creates a string table with the required values for an expression.voidWrite an ESExpr to the stream.static voidwriteWithSymbolTable(@NotNull OutputStream os, @NotNull ESExpr expr) Write an expression with an embedded string table.
-
Constructor Details
-
ESExprBinaryWriter
public ESExprBinaryWriter(@NotNull @NotNull List<? extends @NotNull String> symbolTable, OutputStream os) Creates an encoder.- Parameters:
symbolTable- The symbol table used when parsing.os- The stream.
-
-
Method Details
-
write
Write an ESExpr to the stream.- Parameters:
expr- The ESExpr to write.- Throws:
IOException- when an error occurs in the underlying stream.
-
buildSymbolTable
Creates a string table with the required values for an expression.- Parameters:
expr- The expression to scan.- Returns:
- The string table for expr.
-
writeWithSymbolTable
public static void writeWithSymbolTable(@NotNull @NotNull OutputStream os, @NotNull @NotNull ESExpr expr) throws IOException Write an expression with an embedded string table.- Parameters:
os- The stream to write to.expr- The expression to write.- Throws:
IOException- If an IO error occurs.
-