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

com.bytezone.dm3270.structuredfields.EraseResetSF 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.9.1
Show newest version
package com.bytezone.dm3270.structuredfields;

import com.bytezone.dm3270.display.Screen;

public class EraseResetSF extends StructuredField {

  private byte flags;
  private Size size;

  private enum Size {
    DEFAULT, ALTERNATE
  }

  public EraseResetSF(byte[] buffer, int offset, int length) {
    super(buffer, offset, length);

    assert data[0] == StructuredField.ERASE_RESET;
    flags = data[1];

    if ((flags & 0xC0) == 0) {
      size = Size.DEFAULT;
    } else {
      size = Size.ALTERNATE;
    }
  }

  @Override
  public void process(Screen screen) {
  }

  @Override
  public String toString() {
    return "Struct Field : 03 Erase/Reset\n" + String
        .format("   flags     : %02X (%s)", flags, size);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy