public class CobolStringType<T> extends CobolPrimitiveType<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
CobolStringType.Builder<T> |
| Modifier and Type | Method and Description |
|---|---|
FromHostPrimitiveResult<T> |
fromHost(Class<T> javaClass,
CobolContext cobolContext,
byte[] hostData,
int start)
Convert mainframe data into a Java object.
|
int |
getBytesLen()
Determine the length in bytes of the mainframe representation of this
type.
|
static int |
getBytesLen(int charNum) |
boolean |
isValid(Class<T> javaClass,
CobolContext cobolContext,
byte[] hostData,
int start)
Check if a byte array contains valid mainframe data for this type
characteristics.
|
protected boolean |
isValidString(CobolContext cobolContext,
byte[] hostData,
int start)
Relatively naive implementation that assumes content is either low-value
or a code point greater or equal to the space character.
|
accept, fromHost, getCobolName, getDependingOn, getJavaClass, getMaxBytesLen, getMinBytesLen, isCustomVariable, isOdoObject, isValidpublic boolean isValid(Class<T> javaClass, CobolContext cobolContext, byte[] hostData, int start)
isValid in class CobolPrimitiveType<T>javaClass - target java typecobolContext - host COBOL configuration parametershostData - the byte array containing mainframe datastart - the start position for the expected type in the byte arrayprotected boolean isValidString(CobolContext cobolContext, byte[] hostData, int start)
cobolContext - host COBOL configuration parametershostData - the byte array containing mainframe datastart - the start position for the expected type in the byte arraypublic FromHostPrimitiveResult<T> fromHost(Class<T> javaClass, CobolContext cobolContext, byte[] hostData, int start)
fromHost in class CobolPrimitiveType<T>javaClass - target java typecobolContext - host COBOL configuration parametershostData - the byte array containing mainframe datastart - the start position for the expected type in the byte arraypublic int getBytesLen()
CobolPrimitiveTypegetBytesLen in class CobolPrimitiveType<T>public static int getBytesLen(int charNum)
Copyright © 2021 LegSem. All rights reserved.