All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bytezone.dm3270.replyfield.OEMAuxiliaryDevice Maven / Gradle / Ivy

Go to download

This is a trimmed down version of https://github.com/dmolony/dm3270 to be used as TN3270 client library

There is a newer version: 0.15-lib
Show newest version
package com.bytezone.dm3270.replyfield;

import com.bytezone.dm3270.Charset;
import com.bytezone.dm3270.structuredfields.StructuredField;

public class OEMAuxiliaryDevice extends QueryReplyField {

  private final byte flags;
  private final byte refID;
  private final String deviceType;
  private final String userName;

  public OEMAuxiliaryDevice(byte[] buffer, Charset charset) {
    super(buffer);

    assert data[0] == StructuredField.QUERY_REPLY;
    assert data[1] == QueryReplyField.OEM_AUXILIARY_DEVICE_REPLY;

    flags = data[2];
    refID = data[3];
    deviceType = charset.getString(data, 4, 8).trim();
    userName = charset.getString(data, 12, 8).trim();

  }

  @Override
  public String toString() {
    return super.toString() + String.format("%n  flags1     : %02X", flags)
        + String.format("%n  ref ID     : %02X", refID)
        + String.format("%n  type       : %s", deviceType)
        + String.format("%n  name       : %s", userName);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy