Class MemberReader

  • All Implemented Interfaces:
    Closeable, AutoCloseable, Readable

    public final class MemberReader
    extends Reader
    Reads text from a z/OS member, providing for the efficient reading of characters.

    The entire content of the member will be obtained at the moment the MemberReader is constructed and stored in a temporary file. Therefore, any reads done on that MemberReader object will reflect the content of the member at the moment the MemberReader object was constructed, rather than the content of the member at the moment the of read. When close is called, the temporary file will be deleted.

    The text returned will be in UTF-8 encoding. Non-displayable binary data will be substituted with Unicode characters that are outside of the code page of the mainframe host login. This allows us to distinguish text data from binary within UTF-8, and if the data is written back to the mainframe using a MemberWriter, those Unicode characters will be replaced with the corresponding binary bytes.

    For efficient reading of member records, it is advisable to wrap a BufferedReader around a MemberReader. For example,

    BufferedReader in = new BufferedReader(new MemberReader(...));

    Regarding parameter validation for the methods within this class:

    A dataset name is considered invalid if:

    • The total length of the name is 0 or is greater than 44 characters.
    • The length of any qualifier within the name is 0 or is greater than 8 characters.
    • Qualifiers are delimited by anything other than a '.' character.
    • Any characters outside of the code page 1047 hex values for A-Z, a-z, 0-9, @, #, $, or - are present.
    • Any qualifier (and hence the name itself) starts with a digit (0-9) or a hyphen (-).

    A PDS member name is considered invalid if:

    • The length of the name is 0 or is greater than 8 characters.
    • Any characters outside of the code page 1047 hex values for A-Z, a-z, 0-9, @, #, or $ are present.
    • The name starts with a digit (0-9).
    Since:
    1.0.0
    Version:
    2.0.0
    See Also:
    IPartitionedDataSetMember
    Restriction:
    This class is not intended to be extended by clients.