annotate src/org/tn5250j/framework/tn5250/Stream5250.java @ 112:77ac18bc1b2f

cleanup java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 18 Jun 2014 13:03:01 -0700
parents e8d2a24e85c6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
1 /**
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
2 * Title: tn5250J
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
3 * Copyright: Copyright (c) 2001
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
4 * Company:
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
5 * @author Kenneth J. Pouncey
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
6 * @version 0.4
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
7 *
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
8 * Description:
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
9 *
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2, or (at your option)
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
13 * any later version.
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
14 *
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
18 * GNU General Public License for more details.
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
19 *
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
21 * along with this software; see the file COPYING. If not, write to
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
22 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
23 * Boston, MA 02111-1307 USA
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
24 *
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
25 */
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
26 package org.tn5250j.framework.tn5250;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
27
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
28 public class Stream5250 {
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
29
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
30 public int streamSize;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
31 public int opCode;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
32 public int dataStart;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
33 public int pos;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
34 public byte buffer[];
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
35
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
36 public Stream5250(byte abyte0[]) {
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
37 buffer = abyte0;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
38 // size without end of record 0xFF 0xEF
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
39 streamSize = (abyte0[0] & 0xff) << 8 | abyte0[1] & 0xff;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
40 opCode = abyte0[9];
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
41 dataStart = 6 + abyte0[6];
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
42 pos = dataStart;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
43 }
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
44
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
45 public Stream5250() {
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
46 buffer = null;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
47 streamSize = 0;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
48 opCode = 0;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
49 dataStart = 0;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
50 pos = dataStart;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
51 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
52
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
53 /**
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
54 * This method takes a byte array and initializes the object information
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
55 * to be used.
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
56 *
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
57 * @param abyte0
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
58 */
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
59 public void initialize(byte abyte0[]) {
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
60 buffer = abyte0;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
61 // size without end of record 0xFF 0xEF
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
62 streamSize = (abyte0[0] & 0xff) << 8 | abyte0[1] & 0xff;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
63 opCode = abyte0[9];
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
64 dataStart = 6 + abyte0[6];
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
65 pos = dataStart;
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
66 }
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
67
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
68 public final int getOpCode() {
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
69 return opCode;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
70 }
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
71
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
72 public final byte getNextByte()
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
73 throws Exception {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
74 if (buffer == null || pos > buffer.length)
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
75 throw new Exception("Buffer length exceeded: " + pos);
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
76 else
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
77 return buffer[pos++];
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
78 }
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
79
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
80 public final void setPrevByte()
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
81 throws Exception {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
82 if (pos == 0) {
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
83 throw new Exception("Index equals zero.");
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
84 }
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
85 else {
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
86 pos--;
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
87 return;
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
88 }
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
89 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
90
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
91 /**
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
92 * Returns where we are in the buffer
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
93 * @return position in the buffer
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
94 */
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
95 public final int getCurrentPos() {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
96 return pos;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
97 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
98
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
99 public final byte getByteOffset(int off)
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
100 throws Exception {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
101 if (buffer == null || (pos + off) > buffer.length)
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
102 throw new Exception("Buffer length exceeded: " + pos);
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
103 else
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
104 return buffer[pos + off];
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
105 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
106
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
107 public final boolean size() {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
108 return pos >= streamSize;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
109 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
110
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
111
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
112 /**
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
113 * Determines if any more bytes are available in the buffer to be processed.
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
114 * @return yes or no
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
115 */
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
116 public final boolean hasNext() {
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
117 // return pos >= buffer.length;
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
118 return pos < streamSize;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
119 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
120
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
121 /**
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
122 * This routine will retrieve a segment based on the first two bytes being
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
123 * the length of the segment.
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
124 *
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
125 * @return a new byte array containing the bytes of the segment.
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
126 * @throws Exception
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
127 */
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
128 public final byte[] getSegment() throws Exception {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
129 // The first two bytes contain the length of the segment.
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
130 int length = ((buffer[pos] & 0xff) << 8 | (buffer[pos + 1] & 0xff));
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
131 // allocate space for it.
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
132 byte[] segment = new byte[length];
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
133 getSegment(segment, length, true);
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
134 return segment;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
135 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
136
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
137
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
138 /**
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
139 * This routine will retrieve a byte array based on the first two bytes being
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
140 * the length of the segment.
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
141 *
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
142 * @param segment - byte array
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
143 * @param length - length of segment to return
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
144 * @param adjustPos - adjust the position of the buffer to the end of the seg
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
145 * ment
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
146 * @throws Exception
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
147 */
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
148 public final void getSegment(byte[] segment, int length, boolean adjustPos)
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
149 throws Exception {
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
150 // If the length is larger than what is available throw an exception
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
151 if ((pos + length) > buffer.length)
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
152 throw new Exception("Buffer length exceeded: start " + pos
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
153 + " length " + length);
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
154
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
155 // use the system array copy to move the bytes from the buffer
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
156 // to the allocated byte array
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
157 System.arraycopy(buffer, pos, segment, 0, length);
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
158
112
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
159 // update the offset to be after the segment so the next byte can be read
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
160 if (adjustPos)
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
161 pos += length;
77ac18bc1b2f cleanup java formatting
Carl Byington <carl@five-ten-sg.com>
parents: 3
diff changeset
162 }
3
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
163
e8d2a24e85c6 adding tn5250 files
Carl Byington <carl@five-ten-sg.com>
parents:
diff changeset
164 }