public class DataStream3270 extends Object
Modifier and Type | Field and Description |
---|---|
static char |
ASCII_FA
Special ASCII code: Field Attribute.
|
static int |
ATTR_BASICMASK
The basic attribute mask when getting the attribute to send it to host.
|
static int |
ATTR_EXTENDEDCOLORMASK
The mask used to find out if a character or field attribute
has extended color properties.
|
static int |
ATTR_FLAG_ALL_FLAGS |
static int |
ATTR_FLAG_BACKCOLOR |
static int |
ATTR_FLAG_CHARSET |
static int |
ATTR_FLAG_FORECOLOR |
static int |
ATTR_FLAG_HIGHLIGHT |
static int |
ATTR_FLAG_OUTLINE |
static int |
ATTR_GECHAR |
static int |
ATTR_HIGHLIGHT_BLINK |
static int |
ATTR_HIGHLIGHT_REVERSE |
static int |
ATTR_HIGHLIGHT_UNDERLINE |
static int |
ATTR_INTENSITY |
static int |
ATTR_MASK_ALL_EQUALIZE |
static int |
ATTR_MASK_ALL_EXTENDED |
static int |
ATTR_MASK_ALL_EXTENDED_BITS
The mask used to find out if a character or field attribute
has extended properties, not including the GE character, the special character and the needs update flag.
|
static int |
ATTR_MASK_BACKCOLOR |
static int |
ATTR_MASK_CHARSET |
static int |
ATTR_MASK_FORECOLOR |
static int |
ATTR_MASK_HIGHLIGHT |
static int |
ATTR_MASK_OUTLINE |
static int |
ATTR_MODIFIED |
static int |
ATTR_NEEDSUPDATE |
static int |
ATTR_NONDISPLAY |
static int |
ATTR_NUMERIC |
static int |
ATTR_PROTECTED |
static int |
ATTR_RESERVED |
static int |
ATTR_SHIFT_BACKCOLOR |
static int |
ATTR_SHIFT_CHARSET |
static int |
ATTR_SHIFT_FORECOLOR |
static int |
ATTR_SHIFT_HIGHLIGHT |
static int |
ATTR_SHIFT_OUTLINE |
static int |
ATTR_SPECIALCHAR |
static int |
ATTR_TRANSGRAPHIC0 |
static int |
ATTR_TRANSGRAPHIC1 |
protected HostSession3270 |
hostSession
The 3270 host session.
|
static int |
ORDER_FC_DUP |
static int |
ORDER_FC_FM |
static int |
STATE_FULL |
static int |
STATE_NUMERIC |
static int |
STATE_PROTECTED |
static int |
STATE_SENDING |
static int |
STATE_SYSTEM |
static int |
STATE_WAITING |
Constructor and Description |
---|
DataStream3270(HostSession3270 hs)
Creates the 3270 data stream.
|
Modifier and Type | Method and Description |
---|---|
protected String |
checkPrinterOperation(int wcc,
String text)
Checks the printer operation type in the WCC for LU3 type printers.
|
protected boolean |
doPrinterCR()
Checks if a printer will handle a CR order.
|
protected boolean |
doPrinterEM(int addr)
Checks if a printer will handle a EM order.
|
protected boolean |
doPrinterFF(int addr)
Checks if a printer will handle a FF order.
|
protected boolean |
doPrinterNL()
Checks if a printer will handle a NL order.
|
protected void |
markEndOfPrint(int addr)
Marks the last printing address.
|
void |
processData(short[] buf,
int pos,
int buflen)
Processes an incoming 3270 data stream.
|
void |
readModifiedCommand(boolean fromSF,
boolean allFields)
Read Modified Command.
|
protected int |
sfQueryReplyCharacterSets(short[] buf,
int n)
Responds to the character sets query.
|
protected int |
sfQueryReplyHighlighting(short[] buf,
int n)
Responds to the highlighting query.
|
protected int |
sfQueryReplyImplicitPartition(short[] buf,
int n)
Responds to the implicit partition query.
|
protected int |
sfQueryReplyNull(short[] buf,
int n)
Responds to a query when no reply matches.
|
protected int |
sfQueryReplyReplyModes(short[] buf,
int n)
Query Reply - Reply Modes
|
protected int |
sfQueryReplySummary(short[] buf,
int n)
Query Reply Summary.
|
protected int |
sfQueryReplyUseableArea(short[] buf,
int n)
Query Reply Usable Area
|
protected void |
write(short[] buf,
int n)
Writes an amount of bytes of 3270 data stream.
|
protected void |
writeCommand(int startPos,
short[] buf,
int buflen)
Write Command.
|
void |
writeDisplay(int startPos,
short[] buf,
int buflen,
boolean isSSCPLU)
Handles Write Command as well as SSCP-LU data.
|
public static final int ORDER_FC_DUP
public static final int ORDER_FC_FM
protected HostSession3270 hostSession
public static final int STATE_SYSTEM
public static final int STATE_SENDING
public static final int STATE_WAITING
public static final int STATE_PROTECTED
public static final int STATE_FULL
public static final int STATE_NUMERIC
public static final int ATTR_MODIFIED
public static final int ATTR_RESERVED
public static final int ATTR_NONDISPLAY
public static final int ATTR_INTENSITY
public static final int ATTR_NUMERIC
public static final int ATTR_PROTECTED
public static final int ATTR_TRANSGRAPHIC0
public static final int ATTR_TRANSGRAPHIC1
public static final int ATTR_SHIFT_FORECOLOR
public static final int ATTR_SHIFT_BACKCOLOR
public static final int ATTR_SHIFT_OUTLINE
public static final int ATTR_SHIFT_HIGHLIGHT
public static final int ATTR_SHIFT_CHARSET
public static final int ATTR_MASK_FORECOLOR
public static final int ATTR_MASK_BACKCOLOR
public static final int ATTR_MASK_OUTLINE
public static final int ATTR_MASK_HIGHLIGHT
public static final int ATTR_MASK_CHARSET
public static final int ATTR_MASK_ALL_EXTENDED
public static final int ATTR_MASK_ALL_EQUALIZE
public static final int ATTR_FLAG_FORECOLOR
public static final int ATTR_FLAG_BACKCOLOR
public static final int ATTR_FLAG_OUTLINE
public static final int ATTR_FLAG_HIGHLIGHT
public static final int ATTR_FLAG_CHARSET
public static final int ATTR_FLAG_ALL_FLAGS
public static final int ATTR_SPECIALCHAR
public static final int ATTR_GECHAR
public static final int ATTR_NEEDSUPDATE
public static final int ATTR_MASK_ALL_EXTENDED_BITS
public static final int ATTR_HIGHLIGHT_BLINK
public static final int ATTR_HIGHLIGHT_REVERSE
public static final int ATTR_HIGHLIGHT_UNDERLINE
public static final int ATTR_BASICMASK
public static final int ATTR_EXTENDEDCOLORMASK
public static final char ASCII_FA
public DataStream3270(HostSession3270 hs)
public void processData(short[] buf, int pos, int buflen) throws IOException
IOException
- if an I/O error occurs.protected void write(short[] buf, int n) throws IOException
IOException
- if an I/O error occurs.public void readModifiedCommand(boolean fromSF, boolean allFields) throws IOException
During a read modified operation, if an AID other than PA key or a Clear key is generated, all fields that have been modified by keyboard are transferred to the application program. A major feature of the read modified operation is null suppression.
If the buffer is unformatted (contains no fields), the read data stream consists of the 3-byte read heading followed by all alphanumeric data in the buffer (nulls are suppressed). Data transfer starts at address 0 and continues to the end of the buffer.
The format of the Read Modified Field data stream is as follows:
------ ---------------- ----- ----------------------- ------- | AID | Cursor Address | SBA | Attribute Address + 1 | Text | ------ ---------------- ----- ----------------------- -------
IOException
- if an I/O error occurs.protected String checkPrinterOperation(int wcc, String text)
protected void writeCommand(int startPos, short[] buf, int buflen) throws IOException
The Write command writes data into specified locations of the character buffer. Data is stored in successive buffer locations until an order is encountered in the data stream.
During the write operation, the buffer address is advanced one location as each character is stored.
The buffer location where the entry of data starts depends on the starting location specified by the SBA order that follows the WCC. If an SBA does not follow the WCC, the starting location is the buffer address where the cursor is positioned.
IOException
- if an I/O error occurs.public void writeDisplay(int startPos, short[] buf, int buflen, boolean isSSCPLU) throws IOException
IOException
- if an I/O error occurs.protected boolean doPrinterCR()
protected boolean doPrinterNL()
protected boolean doPrinterFF(int addr)
protected boolean doPrinterEM(int addr)
protected void markEndOfPrint(int addr)
protected int sfQueryReplyNull(short[] buf, int n)
The Query Reply (Null) structured field informs the host that the device does not support any of the features or functions that the host inquired about with the Read Partition structured field specifying Query List (QCODE List). If the host queries the device and the device supports at least one feature or function that was queried about, then the Null Query Reply is not sent to the host.
This Query Reply must always be sent inbound in reply to a Read Partition structured field specifying Query List (QCODE List = X'FF') if the device does not support any of the queried options or functions.
protected int sfQueryReplySummary(short[] buf, int n)
Informs host of supported QCODES.
protected int sfQueryReplyUseableArea(short[] buf, int n)
Informs host of base information.
protected int sfQueryReplyReplyModes(short[] buf, int n)
It is used to inform the host of the following: the 3270 Data Stream attribute orders that the device supports and the modes that can be used by the Set Reply Modes structured field.
Modes supported:
- Field mode (SBA SF) - Extended field mode (SBA SF SFE MF) - Character mode (SBA SF SFE MF SA)
protected int sfQueryReplyCharacterSets(short[] buf, int n) throws IOException
IOException
- if an I/O error occurs.protected int sfQueryReplyHighlighting(short[] buf, int n)
protected int sfQueryReplyImplicitPartition(short[] buf, int n)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.