Refactor
Build and Test j3270 / Build JAR & Run Tests (push) Successful in 44s

This commit is contained in:
2026-08-25 16:05:12 +00:00
parent 36b93df986
commit 7eebd2107c
56 changed files with 308 additions and 308 deletions
@@ -1,4 +1,4 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
/**
* Configuration for a 3270 terminal connection.
@@ -12,13 +12,13 @@ public class ConnectionConfig {
private boolean extendedDataStream = true;
private boolean useTls = false;
private boolean tlsVerifyCert = true;
private org.lib3270j.tls.TlsCertificateVerifier certificateVerifier = null;
private haus.nightmare.lib3270j.tls.TlsCertificateVerifier certificateVerifier = null;
private String sslProtocol = "TLS";
private int connectTimeoutMs = 15000;
private int nopIntervalSeconds = 0;
private String terminalName = null; // override terminal type string
private boolean tn3270eEnabled = true;
private org.lib3270j.graphics.GraphicsMode graphicsMode = org.lib3270j.graphics.GraphicsMode.BOTH;
private haus.nightmare.lib3270j.graphics.GraphicsMode graphicsMode = haus.nightmare.lib3270j.graphics.GraphicsMode.BOTH;
public ConnectionConfig() {}
@@ -70,8 +70,8 @@ public class ConnectionConfig {
public boolean isTn3270eEnabled() { return tn3270eEnabled; }
public void setTn3270eEnabled(boolean enabled) { this.tn3270eEnabled = enabled; }
public org.lib3270j.tls.TlsCertificateVerifier getCertificateVerifier() { return certificateVerifier; }
public void setCertificateVerifier(org.lib3270j.tls.TlsCertificateVerifier verifier) { this.certificateVerifier = verifier; }
public haus.nightmare.lib3270j.tls.TlsCertificateVerifier getCertificateVerifier() { return certificateVerifier; }
public void setCertificateVerifier(haus.nightmare.lib3270j.tls.TlsCertificateVerifier verifier) { this.certificateVerifier = verifier; }
public String getSslProtocol() { return sslProtocol; }
public void setSslProtocol(String protocol) { this.sslProtocol = protocol; }
@@ -82,9 +82,9 @@ public class ConnectionConfig {
public int getNopIntervalSeconds() { return nopIntervalSeconds; }
public void setNopIntervalSeconds(int s) { this.nopIntervalSeconds = s; }
public org.lib3270j.graphics.GraphicsMode getGraphicsMode() { return graphicsMode; }
public void setGraphicsMode(org.lib3270j.graphics.GraphicsMode mode) {
this.graphicsMode = (mode != null) ? mode : org.lib3270j.graphics.GraphicsMode.NONE;
public haus.nightmare.lib3270j.graphics.GraphicsMode getGraphicsMode() { return graphicsMode; }
public void setGraphicsMode(haus.nightmare.lib3270j.graphics.GraphicsMode mode) {
this.graphicsMode = (mode != null) ? mode : haus.nightmare.lib3270j.graphics.GraphicsMode.NONE;
}
public String getTerminalName() { return terminalName; }
@@ -1,4 +1,4 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
/**
* Connection state machine states.
@@ -1,8 +1,8 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.listener.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.listener.*;
import java.util.logging.*;
@@ -15,7 +15,7 @@ public class DiagnosticClient {
static Telnet3270Client client;
public static void main(String[] args) throws Exception {
Logger rootLogger = Logger.getLogger("org.lib3270j");
Logger rootLogger = Logger.getLogger("haus.nightmare.lib3270j");
rootLogger.setLevel(Level.ALL);
Handler handler = new ConsoleHandler();
handler.setLevel(Level.ALL);
@@ -1,13 +1,13 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.input.InputProcessor;
import org.lib3270j.listener.ConnectionListener;
import org.lib3270j.listener.ScreenUpdateListener;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.telnet.TelnetConnection;
import org.lib3270j.telnet.TelnetFSM;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.input.InputProcessor;
import haus.nightmare.lib3270j.listener.ConnectionListener;
import haus.nightmare.lib3270j.listener.ScreenUpdateListener;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.telnet.TelnetConnection;
import haus.nightmare.lib3270j.telnet.TelnetFSM;
import java.io.IOException;
import java.util.logging.Logger;
@@ -126,7 +126,7 @@ public class Telnet3270Client {
public ConnectionConfig getConfig() { return config; }
/** Set a custom or interactive TLS certificate verifier callback. */
public void setTlsCertificateVerifier(org.lib3270j.tls.TlsCertificateVerifier verifier) {
public void setTlsCertificateVerifier(haus.nightmare.lib3270j.tls.TlsCertificateVerifier verifier) {
config.setCertificateVerifier(verifier);
}
@@ -154,7 +154,7 @@ public class Telnet3270Client {
/** Send Enter key. */
public void sendEnter() {
inputProcessor.sendAid(org.lib3270j.protocol.DS3270Constants.AID_ENTER);
inputProcessor.sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_ENTER);
}
/** Send a PF key (1-24). */
@@ -192,7 +192,7 @@ public class Telnet3270Client {
/** Send Clear key. */
public void sendClear() {
inputProcessor.sendAid(org.lib3270j.protocol.DS3270Constants.AID_CLEAR);
inputProcessor.sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_CLEAR);
}
/** Move cursor up. */
@@ -224,15 +224,15 @@ public class Telnet3270Client {
/** Reset (unlock keyboard). */
public void reset() { inputProcessor.reset(); }
public org.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
public haus.nightmare.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
return dsProcessor.getProgramSymbolManager();
}
public org.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
public haus.nightmare.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
return dsProcessor.getGraphicsPlane();
}
public org.lib3270j.graphics.GocaDecoder getGocaDecoder() {
public haus.nightmare.lib3270j.graphics.GocaDecoder getGocaDecoder() {
return dsProcessor.getGocaDecoder();
}
}
@@ -1,6 +1,6 @@
package org.lib3270j;
package haus.nightmare.lib3270j;
import static org.lib3270j.protocol.DS3270Constants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* Terminal model definitions for IBM 3278 and 3279 terminals.
@@ -1,4 +1,4 @@
package org.lib3270j.charset;
package haus.nightmare.lib3270j.charset;
/**
* EBCDIC Unicode translator.
@@ -1,10 +1,10 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.listener.ScreenUpdateListener;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.listener.ScreenUpdateListener;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
import java.io.ByteArrayOutputStream;
import java.util.List;
@@ -34,15 +34,15 @@ public class DataStreamProcessor {
private OutputSender outputSender;
// File Transfer DFT handler
private org.lib3270j.ft.FTDft ftDft;
private haus.nightmare.lib3270j.ft.FTDft ftDft;
// Input processor reference to manage keyboard locking state
private org.lib3270j.input.InputProcessor inputProcessor;
private haus.nightmare.lib3270j.input.InputProcessor inputProcessor;
// Graphics & Programmed Symbols
private final org.lib3270j.graphics.ProgramSymbolManager programSymbolManager = new org.lib3270j.graphics.ProgramSymbolManager();
private final org.lib3270j.graphics.GraphicsPlane graphicsPlane = new org.lib3270j.graphics.GraphicsPlane(800, 600);
private final org.lib3270j.graphics.GocaDecoder gocaDecoder = new org.lib3270j.graphics.GocaDecoder(graphicsPlane);
private final haus.nightmare.lib3270j.graphics.ProgramSymbolManager programSymbolManager = new haus.nightmare.lib3270j.graphics.ProgramSymbolManager();
private final haus.nightmare.lib3270j.graphics.GraphicsPlane graphicsPlane = new haus.nightmare.lib3270j.graphics.GraphicsPlane(800, 600);
private final haus.nightmare.lib3270j.graphics.GocaDecoder gocaDecoder = new haus.nightmare.lib3270j.graphics.GocaDecoder(graphicsPlane);
private final java.io.ByteArrayOutputStream gocaAccumulator = new java.io.ByteArrayOutputStream();
private int currentGocaSubtype = 0;
@@ -65,15 +65,15 @@ public class DataStreamProcessor {
return qrBuilder;
}
public org.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
public haus.nightmare.lib3270j.graphics.ProgramSymbolManager getProgramSymbolManager() {
return programSymbolManager;
}
public org.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
public haus.nightmare.lib3270j.graphics.GraphicsPlane getGraphicsPlane() {
return graphicsPlane;
}
public org.lib3270j.graphics.GocaDecoder getGocaDecoder() {
public haus.nightmare.lib3270j.graphics.GocaDecoder getGocaDecoder() {
return gocaDecoder;
}
@@ -81,15 +81,15 @@ public class DataStreamProcessor {
this.outputSender = sender;
}
public void setFTDft(org.lib3270j.ft.FTDft ftDft) {
public void setFTDft(haus.nightmare.lib3270j.ft.FTDft ftDft) {
this.ftDft = ftDft;
}
public void setInputProcessor(org.lib3270j.input.InputProcessor inputProcessor) {
public void setInputProcessor(haus.nightmare.lib3270j.input.InputProcessor inputProcessor) {
this.inputProcessor = inputProcessor;
}
public org.lib3270j.input.InputProcessor getInputProcessor() {
public haus.nightmare.lib3270j.input.InputProcessor getInputProcessor() {
return inputProcessor;
}
@@ -213,7 +213,7 @@ public class DataStreamProcessor {
ExtendedAttribute ea = screen.getCell(addr);
byte fa = screen.getFieldAttributeAt(addr);
if ((fa & org.lib3270j.protocol.DS3270Constants.FA_MASK) == org.lib3270j.protocol.DS3270Constants.FA_INT_ZERO_NSEL) {
if ((fa & haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MASK) == haus.nightmare.lib3270j.protocol.DS3270Constants.FA_INT_ZERO_NSEL) {
if (ea.ucs4 > 0x20 && ea.ucs4 != 0xFF) {
line.append('*');
hasContent = true;
@@ -813,27 +813,27 @@ public class DataStreamProcessor {
log.fine("SF_TRANSFER_DATA received but ftDft is null");
}
break;
case org.lib3270j.graphics.GocaConstants.SF_LOADPS_DIRECT: // 0x06: Load Programmed Symbols direct
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_LOADPS_DIRECT: // 0x06: Load Programmed Symbols direct
if (fieldLen > 3) {
byte[] psData = new byte[fieldLen - 3];
System.arraycopy(data, pos + 3, psData, 0, psData.length);
programSymbolManager.loadps(psData);
}
break;
case org.lib3270j.graphics.GocaConstants.SF_LOADPS: { // 0x0F: 2-byte Structured Field prefix
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_LOADPS: { // 0x0F: 2-byte Structured Field prefix
if (fieldLen >= 4) {
int sfSubId = data[pos + 3] & 0xFF;
switch (sfSubId) {
case org.lib3270j.graphics.GocaConstants.SF_LOADPS_SUB: // 0x06: Load Programmed Symbols
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_LOADPS_SUB: // 0x06: Load Programmed Symbols
if (fieldLen > 4) {
byte[] psData = new byte[fieldLen - 4];
System.arraycopy(data, pos + 4, psData, 0, psData.length);
programSymbolManager.loadps(psData);
}
break;
case org.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB: // 0x11: Object Control (Procedure orders)
case org.lib3270j.graphics.GocaConstants.SF_OBJPICT_SUB: // 0x10: Object Picture (Picture segments)
case org.lib3270j.graphics.GocaConstants.SF_OBJDATA_SUB: { // 0x0F: Object Data (GOCA draw orders)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB: // 0x11: Object Control (Procedure orders)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJPICT_SUB: // 0x10: Object Picture (Picture segments)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJDATA_SUB: { // 0x0F: Object Data (GOCA draw orders)
int flags = (fieldLen >= 6) ? (data[pos + 5] & 0xC0) : 0xC0;
int orderOffset = (fieldLen >= 7) ? (pos + 7) : (pos + 4);
int orderLen = Math.max(0, fieldLen - (orderOffset - pos));
@@ -856,7 +856,7 @@ public class DataStreamProcessor {
}
byte[] fullStream = gocaAccumulator.toByteArray();
gocaAccumulator.reset();
if (currentGocaSubtype == org.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
if (currentGocaSubtype == haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
gocaDecoder.processProcedureOrders(fullStream, 0, fullStream.length);
} else {
gocaDecoder.decodeStream(fullStream, 0, fullStream.length);
@@ -864,7 +864,7 @@ public class DataStreamProcessor {
notifyScreenUpdated();
} else { // SPAN_ONLY (0xC0)
gocaAccumulator.reset();
if (sfSubId == org.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
if (sfSubId == haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL_SUB) {
gocaDecoder.processProcedureOrders(data, orderOffset, orderLen);
} else {
gocaDecoder.decodeStream(data, orderOffset, orderLen);
@@ -880,15 +880,15 @@ public class DataStreamProcessor {
}
break;
}
case org.lib3270j.graphics.GocaConstants.SF_OBJCNTL: // 0x24: Object Control (Procedure orders)
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJCNTL: // 0x24: Object Control (Procedure orders)
if (fieldLen > 3) {
graphicsPlane.setScreenDimensions(screen.getCols(), screen.getRows());
gocaDecoder.processProcedureOrders(data, pos + 3, fieldLen - 3);
notifyScreenUpdated();
}
break;
case org.lib3270j.graphics.GocaConstants.SF_OBJDATA: // 0x85: Graphics Object Data / GOCA
case org.lib3270j.graphics.GocaConstants.SF_3270_G: // 0x20: 3270 Graphics
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_OBJDATA: // 0x85: Graphics Object Data / GOCA
case haus.nightmare.lib3270j.graphics.GocaConstants.SF_3270_G: // 0x20: 3270 Graphics
if (fieldLen > 3) {
graphicsPlane.setScreenDimensions(screen.getCols(), screen.getRows());
gocaDecoder.decodeStream(data, pos + 3, fieldLen - 3);
@@ -1,11 +1,11 @@
package org.lib3270j.datastream;
package haus.nightmare.lib3270j.datastream;
import java.io.ByteArrayOutputStream;
import java.util.logging.Logger;
import org.lib3270j.graphics.GraphicsMode;
import org.lib3270j.screen.ScreenBuffer;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.graphics.GraphicsMode;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* Builds Query Reply structured fields in response to host Read Partition queries.
@@ -493,7 +493,7 @@ public class QueryReplyBuilder {
for (int i = 0; i < 16; i++) {
out.write(0x00);
out.write(i);
int argb = org.lib3270j.graphics.GocaConstants.GOCA_COLORS[i];
int argb = haus.nightmare.lib3270j.graphics.GocaConstants.GOCA_COLORS[i];
int r = (argb >> 16) & 0xFF;
int g = (argb >> 8) & 0xFF;
int b = argb & 0xFF;
@@ -1,4 +1,4 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
/**
* Configuration for an IND$FILE file transfer session.
@@ -1,4 +1,4 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
/**
* Constants for IND$FILE file transfer protocol.
@@ -183,7 +183,7 @@ public final class FTConstants {
* Decode a CUT-mode base-64 encoded integer from EBCDIC.
* Converts a table6-encoded EBCDIC character to its 6-bit value.
*/
public static int from6(int ebcdicByte, org.lib3270j.charset.EbcdicTranslator translator) {
public static int from6(int ebcdicByte, haus.nightmare.lib3270j.charset.EbcdicTranslator translator) {
char ascii = translator.ebcdicToUnicode(ebcdicByte & 0xFF);
int idx = TABLE6.indexOf(ascii);
return idx >= 0 ? idx : 0;
@@ -199,7 +199,7 @@ public final class FTConstants {
/**
* Encode a 6-bit value into a table6-encoded EBCDIC character.
*/
public static int to6(int value, org.lib3270j.charset.EbcdicTranslator translator) {
public static int to6(int value, haus.nightmare.lib3270j.charset.EbcdicTranslator translator) {
char ascii = TABLE6.charAt(value & 0x3F);
int ebc = translator.unicodeToEbcdic(ascii);
return ebc >= 0 ? ebc : ASC2FT[ascii & 0xFF];
@@ -1,10 +1,10 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.input.InputProcessor;
import org.lib3270j.charset.EbcdicTranslator;
import static org.lib3270j.ft.FTConstants.*;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.input.InputProcessor;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static haus.nightmare.lib3270j.ft.FTConstants.*;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
@@ -1,8 +1,8 @@
package org.lib3270j.ft;
package haus.nightmare.lib3270j.ft;
import org.lib3270j.input.InputProcessor;
import org.lib3270j.charset.EbcdicTranslator;
import static org.lib3270j.ft.FTConstants.*;
import haus.nightmare.lib3270j.input.InputProcessor;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static haus.nightmare.lib3270j.ft.FTConstants.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Constants for IBM 3179G / 3270-PC GOCA (Graphics Object Content Architecture)
@@ -1,10 +1,10 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import org.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
/**
* Interprets GOCA (Graphics Object Content Architecture) drawing orders
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Builds the 56-byte IBM 3179G / 3270G Graphic Input Structured Field.
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Graphics modes supported by j3270 / lib3270j.
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import java.util.ArrayList;
import java.util.Arrays;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import java.util.Arrays;
import java.util.logging.Level;
@@ -1,4 +1,4 @@
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
/**
* Represents a set of up to 191 custom bitmapped symbols (LCID 0x40 - 0xFE).
@@ -1,9 +1,9 @@
/*
* Decompiled with CFR 0.152.
*/
package org.lib3270j.graphics;
package haus.nightmare.lib3270j.graphics;
import org.lib3270j.graphics.GocaConstants;
import haus.nightmare.lib3270j.graphics.GocaConstants;
public final class VectorSymbolData {
@@ -1,11 +1,11 @@
package org.lib3270j.input;
package haus.nightmare.lib3270j.input;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.screen.ExtendedAttribute;
import org.lib3270j.charset.EbcdicTranslator;
import org.lib3270j.telnet.TelnetFSM;
import org.lib3270j.protocol.TelnetConstants;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.screen.ExtendedAttribute;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import haus.nightmare.lib3270j.telnet.TelnetFSM;
import haus.nightmare.lib3270j.protocol.TelnetConstants;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
import java.io.ByteArrayOutputStream;
import java.util.logging.Logger;
@@ -31,18 +31,18 @@ public class InputProcessor {
this.fsm = fsm;
}
private org.lib3270j.graphics.GraphicsPlane graphicsPlane;
private org.lib3270j.graphics.GocaDecoder gocaDecoder;
private haus.nightmare.lib3270j.graphics.GraphicsPlane graphicsPlane;
private haus.nightmare.lib3270j.graphics.GocaDecoder gocaDecoder;
public void setGraphicsPlane(org.lib3270j.graphics.GraphicsPlane gp) {
public void setGraphicsPlane(haus.nightmare.lib3270j.graphics.GraphicsPlane gp) {
this.graphicsPlane = gp;
}
public void setGocaDecoder(org.lib3270j.graphics.GocaDecoder gd) {
public void setGocaDecoder(haus.nightmare.lib3270j.graphics.GocaDecoder gd) {
this.gocaDecoder = gd;
}
public org.lib3270j.graphics.GocaDecoder getGocaDecoder() {
public haus.nightmare.lib3270j.graphics.GocaDecoder getGocaDecoder() {
return gocaDecoder;
}
@@ -324,7 +324,7 @@ public class InputProcessor {
int gy = gocaDecoder.getGraphicCursorY();
int pickedSeg = gocaDecoder.findPickedSegment(gx, gy);
int pickTag = gocaDecoder.getSegmentTag(pickedSeg);
byte[] sf = org.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(
byte[] sf = haus.nightmare.lib3270j.graphics.GraphicInputBuilder.buildGraphicInput(
gx, gy, aidCode, true, isShift, isCtrl, pickedSeg, pickTag
);
System.err.println(String.format(
@@ -367,8 +367,8 @@ public class InputProcessor {
ExtendedAttribute faCell = screen.getCell(faPos);
int fa = faCell.fa & 0xFF;
System.out.println("LP: addr=" + address + " faPos=" + faPos + " fa=0x" + String.format("%02X", fa)
+ " selectable=" + org.lib3270j.protocol.DS3270Constants.faIsSelectable(fa));
if (!org.lib3270j.protocol.DS3270Constants.faIsSelectable(fa)) {
+ " selectable=" + haus.nightmare.lib3270j.protocol.DS3270Constants.faIsSelectable(fa));
if (!haus.nightmare.lib3270j.protocol.DS3270Constants.faIsSelectable(fa)) {
return false;
}
@@ -380,28 +380,28 @@ public class InputProcessor {
screen.setCursorAddress(designatorPos);
if (ebcdic == 0x00 || ebcdic == 0x40 || ascii == ' ' || ascii == 0 || (ebcdic != 0x50 && ascii != '&' && ebcdic != 0x6F && ascii != '?' && ebcdic != 0x6E && ascii != '>')) {
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(org.lib3270j.protocol.DS3270Constants.AID_SELECT);
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_SELECT);
return true;
} else if (ebcdic == 0x50 || ascii == '&') {
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(org.lib3270j.protocol.DS3270Constants.AID_ENTER);
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_ENTER);
return true;
} else if (ebcdic == 0x6F || ascii == '?') {
desCell.ec = (byte) 0x6E;
desCell.ucs4 = '>';
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
screen.updateDisplaySnapshot();
return true;
} else if (ebcdic == 0x6E || ascii == '>') {
desCell.ec = (byte) 0x6F;
desCell.ucs4 = '?';
faCell.fa &= ~org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
faCell.fa &= ~haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
screen.updateDisplaySnapshot();
return true;
} else {
faCell.fa |= org.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(org.lib3270j.protocol.DS3270Constants.AID_SELECT);
faCell.fa |= haus.nightmare.lib3270j.protocol.DS3270Constants.FA_MODIFY;
sendAid(haus.nightmare.lib3270j.protocol.DS3270Constants.AID_SELECT);
return true;
}
}
@@ -1,6 +1,6 @@
package org.lib3270j.listener;
package haus.nightmare.lib3270j.listener;
import org.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.ConnectionState;
/**
* Listener for connection state changes and errors.
@@ -1,4 +1,4 @@
package org.lib3270j.listener;
package haus.nightmare.lib3270j.listener;
/**
* Listener for screen buffer changes.
@@ -1,4 +1,4 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
/**
* 3270 Data Stream protocol constants.
@@ -1,4 +1,4 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
/**
* TN3270E protocol constants per RFC 2355.
@@ -1,4 +1,4 @@
package org.lib3270j.protocol;
package haus.nightmare.lib3270j.protocol;
/**
* Telnet protocol constants from RFC 854 and extensions.
@@ -1,4 +1,4 @@
package org.lib3270j.screen;
package haus.nightmare.lib3270j.screen;
/**
* Extended attribute structure for a single screen buffer position.
@@ -1,8 +1,8 @@
package org.lib3270j.screen;
package haus.nightmare.lib3270j.screen;
import org.lib3270j.TerminalModel;
import org.lib3270j.charset.EbcdicTranslator;
import static org.lib3270j.protocol.DS3270Constants.*;
import haus.nightmare.lib3270j.TerminalModel;
import haus.nightmare.lib3270j.charset.EbcdicTranslator;
import static haus.nightmare.lib3270j.protocol.DS3270Constants.*;
/**
* The 3270 screen buffer.
@@ -1,15 +1,15 @@
package org.lib3270j.telnet;
package haus.nightmare.lib3270j.telnet;
import org.lib3270j.ConnectionState;
import org.lib3270j.ConnectionConfig;
import org.lib3270j.Telnet3270Client;
import haus.nightmare.lib3270j.ConnectionState;
import haus.nightmare.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.Telnet3270Client;
import java.io.*;
import java.net.*;
import java.util.logging.Logger;
import java.util.logging.Level;
import static org.lib3270j.protocol.TelnetConstants.*;
import static haus.nightmare.lib3270j.protocol.TelnetConstants.*;
/**
* Manages the raw TCP socket connection to a TN3270 host.
@@ -47,7 +47,7 @@ public class TelnetConnection {
log.info("Connecting with TLS to " + config.getHost() + ":" + config.getPort() +
" (verifyCert=" + config.isTlsVerifyCert() + ")");
try {
javax.net.ssl.SSLContext sslContext = org.lib3270j.tls.TlsTrustManager.createSSLContext(config);
javax.net.ssl.SSLContext sslContext = haus.nightmare.lib3270j.tls.TlsTrustManager.createSSLContext(config);
javax.net.ssl.SSLSocketFactory ssf = sslContext.getSocketFactory();
javax.net.ssl.SSLSocket sslSocket = (javax.net.ssl.SSLSocket) ssf.createSocket();
sslSocket.setKeepAlive(true);
@@ -1,10 +1,10 @@
package org.lib3270j.telnet;
package haus.nightmare.lib3270j.telnet;
import org.lib3270j.*;
import org.lib3270j.datastream.DataStreamProcessor;
import org.lib3270j.protocol.*;
import org.lib3270j.screen.ScreenBuffer;
import org.lib3270j.listener.*;
import haus.nightmare.lib3270j.*;
import haus.nightmare.lib3270j.datastream.DataStreamProcessor;
import haus.nightmare.lib3270j.protocol.*;
import haus.nightmare.lib3270j.screen.ScreenBuffer;
import haus.nightmare.lib3270j.listener.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -14,8 +14,8 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.logging.Logger;
import java.util.logging.Level;
import static org.lib3270j.protocol.TelnetConstants.*;
import static org.lib3270j.protocol.TN3270EConstants.*;
import static haus.nightmare.lib3270j.protocol.TelnetConstants.*;
import static haus.nightmare.lib3270j.protocol.TN3270EConstants.*;
/**
* Telnet finite state machine.
@@ -1,4 +1,4 @@
package org.lib3270j.tls;
package haus.nightmare.lib3270j.tls;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
@@ -1,6 +1,6 @@
package org.lib3270j.tls;
package haus.nightmare.lib3270j.tls;
import org.lib3270j.ConnectionConfig;
import haus.nightmare.lib3270j.ConnectionConfig;
import javax.net.ssl.*;
import java.security.KeyStore;