com.ibm.jzos
Class CatalogSearchField

java.lang.Object
  extended by com.ibm.jzos.CatalogSearchField

public class CatalogSearchField
extends java.lang.Object

A wrapper around the bytes for a specific field returned from a CatalogSearch request Dataset Entry. This class provides a set of helper methods to convert the raw byte data into the expected data types.


Method Summary
 byte[] getBytes()
          Return the raw field bytes.
 char getChar()
          Return a char constructed from the field using the default EBCDIC encoding.
 java.lang.String getFString()
          Return a String constructed from the entire field using the default EBCDIC encoding.
 java.lang.String[] getFStringArray(int len)
          Return an array of fixed length Strings constructed from the entire field using the default EBCDIC encoding.
 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, skipping the lengthField.
 java.lang.String[] getVStringArray()
          Return an array of Strings constructed from the entire field using the default EBCDIC encoding.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBytes

public byte[] getBytes()
Return the raw field bytes.


getLength

public int getLength()
Return the length of the field. As per the documentation, the following lengths have special meaning:


getName

public java.lang.String getName()
Return the field name.


getChar

public char getChar()
Return a char constructed from the field using the default EBCDIC encoding.

Throws:
java.lang.IllegalStateException - if the field length != 1.

getFString

public java.lang.String getFString()
Return a String constructed from the entire field using the default EBCDIC encoding.


getInt

public int getInt()
Return an integer constructed from the bytes in the field.


getIntArray

public int[] getIntArray(int len)
Return an array of integers constructed from the bytes in the field.

Parameters:
len - the length of a single field

getFStringArray

public java.lang.String[] getFStringArray(int len)
Return an array of fixed length Strings constructed from the entire field using the default EBCDIC encoding.

Parameters:
len - the length of a single field

getVStringArray

public java.lang.String[] getVStringArray()
Return an array of Strings constructed from the entire field using the default EBCDIC encoding. Each individual field is assumed to be preceeded with its length.


getVString

public java.lang.String getVString()
Return a String constructed from the field, skipping the lengthField.


isFixedMissing

public boolean isFixedMissing()
Convenience method to test if a fixed field is 0x'FF' filled, indicating that the requested data is missing.

Returns:
true if all of the bytes in the field are set to '0xFF'

isSuppressed

public boolean isSuppressed()
Convenience method to test if a field has been suppressed due to insufficient access permission.

Returns:
true if the field has been suppressed, false otherwise