public enum StructureSupport extends Enum<StructureSupport>
Modifier and Type | Method and Description |
---|---|
static String |
extractCompiledFormula(ResizableMemoryStructure struct,
long preLen,
long len) |
static String |
extractStringValue(ResizableMemoryStructure struct,
long preLen,
long len)
Extracts a "packed" string value from the structure.
|
static String |
extractStringValueUnpacked(ResizableMemoryStructure struct,
long preLen,
long len)
Extracts an "unpacked" string value from the structure.
|
static String |
extractStringValueWordPadded(ResizableMemoryStructure struct,
long preLen,
long len)
Extracts a "padded" string value from the structure.
|
static StructureSupport |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StructureSupport[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static <T extends ResizableMemoryStructure> |
writeCompiledFormula(T struct,
int preLen,
int currentLen,
String formula,
IntConsumer sizeWriter) |
static <T extends ResizableMemoryStructure> |
writeCompiledFormula(T struct,
long preLen,
long currentLen,
String formula,
LongConsumer sizeWriter) |
static <T extends ResizableMemoryStructure> |
writeStringValue(T struct,
int preLen,
int currentLen,
String value,
IntConsumer sizeWriter) |
static <T extends ResizableMemoryStructure> |
writeStringValue(T struct,
long preLen,
long currentLen,
String value,
LongConsumer sizeWriter) |
static <T extends ResizableMemoryStructure> |
writeStringValueShort(T struct,
int preLen,
int currentLen,
String value,
Consumer<Short> sizeWriter) |
static <T extends ResizableMemoryStructure> |
writeStringValueUnpacked(T struct,
int preLen,
int currentLen,
String value,
IntConsumer sizeWriter)
Writes an "unpacked" string value to the provided structure, using the provided
IntConsumer to update
an associated length value. |
static <T extends ResizableMemoryStructure> |
writeStringValueWordPadded(T struct,
int preLen,
int currentLen,
String value,
IntConsumer sizeWriter)
Writes a "padded" string value to the provided structure, using the provided
IntConsumer to update
an associated length value. |
public static StructureSupport[] values()
for (StructureSupport c : StructureSupport.values()) System.out.println(c);
public static StructureSupport valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static String extractStringValue(ResizableMemoryStructure struct, long preLen, long len)
len
, with no null terminator or WORD-size padding.struct
- the structure to extract frompreLen
- the number of bytes before the value to extractlen
- the size of the stored valuepublic static String extractStringValueWordPadded(ResizableMemoryStructure struct, long preLen, long len)
struct
- the structure to extract frompreLen
- the number of bytes before the value to extractlen
- the size of the stored valuepublic static String extractStringValueUnpacked(ResizableMemoryStructure struct, long preLen, long len)
struct
- the structure to extract frompreLen
- the number of bytes before the value to extractlen
- the size of the stored valuepublic static String extractCompiledFormula(ResizableMemoryStructure struct, long preLen, long len)
public static <T extends ResizableMemoryStructure> T writeStringValue(T struct, long preLen, long currentLen, String value, LongConsumer sizeWriter)
public static <T extends ResizableMemoryStructure> T writeStringValue(T struct, int preLen, int currentLen, String value, IntConsumer sizeWriter)
public static <T extends ResizableMemoryStructure> T writeStringValueShort(T struct, int preLen, int currentLen, String value, Consumer<Short> sizeWriter)
public static <T extends ResizableMemoryStructure> T writeStringValueWordPadded(T struct, int preLen, int currentLen, String value, IntConsumer sizeWriter)
IntConsumer
to update
an associated length value. For this use, "unpacked" means that:
T
- the class of the structurestruct
- the structure to modifypreLen
- the amount of variable data in bytes before the place to writecurrentLen
- the current length of the variable data to overwritevalue
- the value to writesizeWriter
- a callback to modify an associated length field, if applicablepublic static <T extends ResizableMemoryStructure> T writeStringValueUnpacked(T struct, int preLen, int currentLen, String value, IntConsumer sizeWriter)
IntConsumer
to update
an associated length value. For this use, "unpacked" means that:
T
- the class of the structurestruct
- the structure to modifypreLen
- the amount of variable data in bytes before the place to writecurrentLen
- the current length of the variable data to overwritevalue
- the value to writesizeWriter
- a callback to modify an associated length field, if applicablepublic static <T extends ResizableMemoryStructure> T writeCompiledFormula(T struct, long preLen, long currentLen, String formula, LongConsumer sizeWriter)
public static <T extends ResizableMemoryStructure> T writeCompiledFormula(T struct, int preLen, int currentLen, String formula, IntConsumer sizeWriter)
Copyright © 2019–2021 HCL. All rights reserved.