Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.jzos
Class CatalogSearchField

    java.lang.Object
      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:
  - -1 The data to be retrieved has been suppressed; security data will be suppressed if the caller does not have the proper RACF authority.
  - 0 No data was found for this entry. This can happen, for instance, if the data does not apply to the particular entry type being supplied.
  - 2 or 4 The data field to be retrieved has variable length and does not exist. Data with variable length is always returned with length information preceding the data and is included as part of data. Therefore, when the field to be retrieved does not exist, this preceding length information is set to 0 and the total length of the data returned will then be the length of this preceding length information.
  - n The data field to be retrieved has fixed length. If the data does not exist for this Dataset, all of the bytes will be set to 0xFF.
  - n The data is retrieved has variable length. n is the length of the data retrieved, including the length prefix.

### 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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD