public class CatalogSearchField
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
byte[] |
getBytes()
Return the raw field bytes.
|
char |
getChar()
Return a char constructed from the field using the default EBCDIC encoding of
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE . |
java.lang.String |
getFString()
Return a String constructed from the entire field using the default EBCDIC encoding of
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE . |
java.lang.String[] |
getFStringArray(int len)
Return an array of fixed length Strings constructed from the entire field
using the default EBCDIC encoding of
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE . |
int |
getInt()
Return an integer constructed from the bytes in the field.
|
int[] |
getIntArray(int len)
Return an array of integers constructed from the bytes in the field.
|
int |
getLength()
Return the length of the field.
|
java.lang.String |
getName()
Return the field name.
|
java.lang.String |
getVString()
Return a String constructed from the field using the default EBCDIC encoding of
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE , skipping the lengthField. |
java.lang.String[] |
getVStringArray()
Return an array of Strings constructed from the entire field using the default
EBCDIC encoding of
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE skipping the lengthField. |
boolean |
isFixedMissing()
Convenience method to test if a fixed field is 0x'FF' filled, indicating that the
requested data is missing.
|
boolean |
isSuppressed()
Convenience method to test if a field has been suppressed due to insufficient
access permission.
|
public byte[] getBytes()
public int getLength()
public java.lang.String getName()
public char getChar()
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE
.java.lang.IllegalStateException
- if the field length != 1.public java.lang.String getFString()
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE
.
The returned String will have trailing space trimmed.
If the field length is -1 (suppressed) or 0, null is returned. See getLength()
and
isSuppressed()
.
public int getInt()
java.lang.IllegalStateException
- if the length of the field is less than 1 or greater than 4 bytespublic int[] getIntArray(int len)
If the field length is -1 (suppressed) or 0, null is returned. See getLength()
and
isSuppressed()
.
len
- the length of a single field, a number between 1 and 4. If len is between 1 and 3,
the values are returned as unsigned integers. If len is 4, the returned values will be signed.java.lang.IllegalStateException
- if the length of the field is not a multiple of len or if len is a
value less than 1 or greater than 4.public java.lang.String[] getFStringArray(int len)
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE
.
The returned Strings will have trailing space trimmed.
If the field length is -1 (suppressed) or 0, null is returned. See getLength()
and
isSuppressed()
.
len
- the length of a single String fieldjava.lang.IllegalStateException
- if the length of the field is not a multiple of lenpublic java.lang.String[] getVStringArray()
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE
skipping the lengthField.
This method assumes that each individual field is preceded by its length.
If the field length is -1 (suppressed) or 0, null is returned. See getLength()
and
isSuppressed()
.
public java.lang.String getVString()
ZFileConstants.DEFAULT_EBCDIC_CODE_PAGE
, skipping the lengthField.
If the field length is -1 (suppressed) or 0, null is returned. See getLength()
and
isSuppressed()
.
public boolean isFixedMissing()
public boolean isSuppressed()