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

com.bytezone.dm3270.replyfield.AuxiliaryDevices 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 java.nio.ByteBuffer;

public class AuxiliaryDevices extends QueryReplyField {

  private final short flags;

  public AuxiliaryDevices(byte[] buffer) {
    super(buffer);
    ByteBuffer dataBuffer = ByteBuffer.wrap(buffer);
    //skip queryReply id
    dataBuffer.get();
    assert dataBuffer.get() == AUXILIARY_DEVICE_REPLY;
    flags = dataBuffer.getShort();
  }

  public AuxiliaryDevices() {
    super(AUXILIARY_DEVICE_REPLY);
    flags = 0;
    ByteBuffer buffer = createReplyBuffer(2);
    buffer.putShort(flags);
  }

  @Override
  public String toString() {
    return super.toString() + String.format("%n  flags     : %02X", flags);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy