Index: src/test/check/NetCheck.java
===================================================================
--- src/test/check/NetCheck.java	(revision 537)
+++ src/test/check/NetCheck.java	(working copy)
@@ -219,13 +219,13 @@
 				labnum ++;
 			} while ((labval & 0x800000) == 0);
 
-			int flags = reader.get() & 0xff; // flags
+			int flags = reader.get1u(); // flags
 			reader.get3u(); //road len
 
 			readLevelDivs(def);
 			if ((flags & RD_HAS_STREET_ADDRESS_INFO) == RD_HAS_STREET_ADDRESS_INFO) {
-				int nblocks = reader.get() & 0xff;
-				int addrFlags = reader.get() & 0xff;
+				int nblocks = reader.get1u();
+				int addrFlags = reader.get1u();
 
 				nblocks += ((addrFlags & 0x3) << 8);
 				def.nblocks = nblocks;
@@ -241,7 +241,7 @@
 			}
 
 			if ((flags & RD_HAS_NOD_INFO) == RD_HAS_NOD_INFO) {
-				int nfollow = reader.get() & 0xff;
+				int nfollow = reader.get1u();
 
 				int nodSize = (nfollow & 0x3) + 1;
 				reader.get(nodSize);
@@ -250,7 +250,7 @@
 					int counter = (nfollow >> 5) & 0x3;
 					if (counter > 0) {
 						while (counter-- > 0) {
-							int uflag = reader.get() & 0xff;
+							int uflag = reader.get1u();
 							//int uflag = d.byteValue("uflag %x") & 0xff;
 
 							//d.item().addText("flag1=%b flag2=%b flag3=%b lo=%d hi=%d", (uflag&U_FLAG_1)!=0, (uflag&U_FLAG_2)!=0, (uflag&U_FLAG_3) !=0, uflag&0x3, (uflag>>>4));
@@ -268,7 +268,7 @@
 							} else {
 								int len;
 								if ((uflag & U_FLAG_2) == U_FLAG_2) {
-									len = (reader.get() & 0xff) << 3;
+									len = reader.get1u() << 3;
 									len += (uflag >>> 5);
 								} else {
 									len = 1 + (uflag >>> 4);
@@ -464,7 +464,7 @@
 			reader.get(n);
 			break;
 		case 0:
-			n = reader.get() & 0xff;
+			n = reader.get1u();
 			byte[] bytes = reader.get(n << mult1);
 			if (name.equals("numbers")) {
 				int rflags = size & 0xff;
@@ -498,7 +498,7 @@
 			while (n-- > 0) {
 				Div div = new Div();
 				div.level = i;
-				div.line = reader.get() & 0xff;
+				div.line = reader.get1u();
 				div.div = reader.get2u();
 				divs.add(div);
 			}
Index: src/test/display/DisplayItem.java
===================================================================
--- src/test/display/DisplayItem.java	(revision 537)
+++ src/test/display/DisplayItem.java	(working copy)
@@ -59,24 +59,28 @@
 		this.sectStart = sectStart;
 	}
 
-	public int setBytes(int in) {
+	public int setBytes4(int in) {
 		value = in;
-		return setBytes(in, 4);
+		setBytes(in, 4);
+		return in;
 	}
 
-	public int setBytes(char in) {
-		value = in & 0xffff;
-		return setBytes(in, 2);
+	public int setBytes3(int in) {
+		value = in;
+		setBytes(in, 3);
+		return in;
 	}
 
-	public int setBytes(byte in) {
-		value = in & 0xff;
-		return setBytes(in, 1);
+	public int setBytes2(int in) {
+		value = in;
+		setBytes(in, 2);
+		return in;
 	}
 
-	public int setBytes3(int in) {
-		value = in & 0xffffff;
-		return setBytes(in, 3) & 0xffffff;
+	public int setBytes1(int in) {
+		value = in;
+		setBytes(in, 1);
+		return in;
 	}
 
 	public int getValue() {
@@ -83,7 +87,7 @@
 		return value;
 	}
 
-	private int setBytes(int in, int n) {
+	private void setBytes(int in, int n) {
 		byte[] newbytes = new byte[nbytes + n];
 
 		if (bytes != null) 
@@ -94,7 +98,6 @@
 			bytes[nbytes+i] = (byte) (in >> (i) * 8 & 0xff);
 		}
 		nbytes += n;
-		return in;
 	}
 
 	public void print(PrintStream out) {
Index: src/test/display/Displayer.java
===================================================================
--- src/test/display/Displayer.java	(revision 537)
+++ src/test/display/Displayer.java	(working copy)
@@ -119,6 +119,9 @@
 		item().addText(" ");
 	}
 
+// %%% would be much safer/clearer for byteValue, sByteValue, charValue etc to return appropriately signed int
+// then more masking could be removed
+    
 	/**
 	 * Display a single byte as unsigned value 0 .. 255  
 	 * @param text
@@ -128,18 +131,19 @@
 		DisplayItem item = byteItem();
 		int val = item.getValue();
 		if (text != null)
-			item.addText(text, val & 0xff);
-		return (byte) (val & 0xff);
+			item.addText(text, val);
+		return (byte) val;
 	}
 
 	/**
 	 * Interpret a single byte as signed value -128 .. 127  
 	 * @param text
-	 * @return
+	 * @return the value as (signed) byte (-128 .. 127)
 	 */
 	public byte sByteValue(String text) {
-		DisplayItem item = byteItem();
-		int val = (byte) item.getValue();
+		DisplayItem item = item();
+		item.setBytes1(reader.get1s());
+		int val = item.getValue();
 		if (text != null)
 			item.addText(text, val);
 		return (byte) val;
@@ -147,7 +151,7 @@
 
 	public DisplayItem byteItem() {
 		DisplayItem item = item();
-		item.setBytes(reader.get());
+		item.setBytes1(reader.get1u());
 		return item;
 	}
 
@@ -155,23 +159,23 @@
 		DisplayItem item = charItem();
 		int val = item.getValue();
 		if (text != null)
-			item.addText(text, (val & 0xffff));
+			item.addText(text, val);
 		return (char) val;
 	}
 
 	public DisplayItem charItem() {
 		DisplayItem item = item();
-		item.setBytes((char)reader.get2u());
+		item.setBytes2(reader.get2u());
 		return item;
 	}
 
 	public short shortValue(String text) {
 		DisplayItem item = item();
-		item.setBytes((char)reader.get2s());
-		short val = (short) item.getValue();
+		item.setBytes2(reader.get2s());
+		int val = item.getValue();
 		if (text != null)
-			item.addText(text, (short) val);
-		return val;
+			item.addText(text, val);
+		return (short) val;
 	}
 
 	public int intValue(String text) {
@@ -184,7 +188,7 @@
 
 	public DisplayItem intItem() {
 		DisplayItem item = item();
-		item.setBytes(reader.get4());
+		item.setBytes4(reader.get4());
 		return item;
 	}
 
@@ -192,16 +196,16 @@
 		DisplayItem item = item();
 		switch (n) {
 		case 1:
-			item.setBytes(reader.get());
+			item.setBytes1(reader.get1u());
 			break;
 		case 2:
-			item.setBytes((char)reader.get2u());
+			item.setBytes2(reader.get2u());
 			break;
 		case 3:
 			item.setBytes3(reader.get3u());
 			break;
 		case 4:
-			item.setBytes(reader.get4());
+			item.setBytes4(reader.get4());
 			break;
 		}
 		return item;
@@ -228,7 +232,7 @@
 		DisplayItem item = int3Item();
 		int val = item.getValue();
 		if (text != null)
-			item.addText(text, (val & 0xffffff));
+			item.addText(text, val);
 		return val;
 	}
 
Index: src/test/display/ImgDisplay.java
===================================================================
--- src/test/display/ImgDisplay.java	(revision 537)
+++ src/test/display/ImgDisplay.java	(working copy)
@@ -80,7 +80,7 @@
 		d.item().addText("...");
 
 		item = d.item();
-		item.setBytes(last);
+		item.setBytes2(last);
 		item.addText("Last block %d", item.getValue());
 		d.gap();
 		return size;
Index: src/test/display/LblDisplay.java
===================================================================
--- src/test/display/LblDisplay.java	(revision 537)
+++ src/test/display/LblDisplay.java	(working copy)
@@ -54,7 +54,7 @@
 		readSection(d, "LBL 1 (labels)", 1, false, false);
 
 		DisplayItem item = d.item();
-		int offsetShift = item.setBytes(reader.get());
+		int offsetShift = item.setBytes1(reader.get1u());
 		item.addText("Label offsets x%d", 1 << offsetShift);
 		d.byteValue("Label coding %d");
 		readSection(d, "LBL 2 countries", 2, true, true);
@@ -163,4 +163,4 @@
 		CommonDisplay nd = new LblDisplay();
 		nd.display(name, "LBL");
 	}
-}
\ No newline at end of file
+}
Index: src/test/display/LineSectDisplayer.java
===================================================================
--- src/test/display/LineSectDisplayer.java	(revision 537)
+++ src/test/display/LineSectDisplayer.java	(working copy)
@@ -161,7 +161,7 @@
 			DisplayItem item = d.item();
 
 			int typ_id = reader.get2u();
-			item.setBytes((char) typ_id);
+			item.setBytes2(typ_id);
 			item.addText("type %x", (typ_id >> 5));
 
 			// Get the offset into the shape style section.
Index: src/test/display/MdrCheck.java
===================================================================
--- src/test/display/MdrCheck.java	(revision 537)
+++ src/test/display/MdrCheck.java	(working copy)
@@ -1544,9 +1544,9 @@
 	private int readMapNumber() {
 		int mn;
 		if (numberOfMaps > 255)
-			mn = (char)reader.get2u() & 0xffff;
+			mn = reader.get2u();
 		else
-			mn = reader.get() & 0xff;
+			mn = reader.get1u();
 		if (mn > numberOfMaps) {
 			assert false : "not a map number " + mn;
 		}
@@ -1568,9 +1568,9 @@
 	private int read(int n) {
 		switch (n) {
 		case 1:
-			return reader.get() & 0xff;
+			return reader.get1u();
 		case 2:
-			return (char)reader.get2u();
+			return reader.get2u();
 		case 3:
 			return reader.get3u();
 		case 4:
Index: src/test/display/MdrDisplay.java
===================================================================
--- src/test/display/MdrDisplay.java	(revision 537)
+++ src/test/display/MdrDisplay.java	(working copy)
@@ -178,7 +178,7 @@
 
 		reader.position(s.getStart());
 		while (reader.position() < s.getEnd()) {
-			int record = reader.get3s();
+			int record = reader.get3u();
 			DisplayItem item = d.item();
 			item.setBytes3(record);
 			item.addText("Type 0x%04x.  Unknown 0x%x",
@@ -414,19 +414,19 @@
 			boolean isRepeat = true;
 
 			if (nPoints < 0x80) {
-				c = item.setBytes(reader.get()) & 0xff;
+				c = item.setBytes1(reader.get1u());
 				if ((c & 0x80) != 0) {
 					isRepeat = false;
 					c &= ~0x80;
 				}
 			} else if (nPoints < 0x8000) {
-				c = item.setBytes(reader.get2u()) & 0xffff;
+				c = item.setBytes2(reader.get2u());
 				if ((c & 0x8000) != 0) {
 					isRepeat = false;
 					c &= ~0x8000;
 				}
 			} else {
-				c = item.setBytes3(reader.get3s());
+				c = item.setBytes3(reader.get3u());
 				if ((c & 0x800000) != 0) {
 					isRepeat = false;
 					c &= ~0x800000;
@@ -448,11 +448,11 @@
 		int c;
 		switch (cityPtrSize) {
 		case 3:
-			c = item.setBytes3(reader.get3s());
+			c = item.setBytes3(reader.get3u());
 			mask = 0x800000;
 			break;
 		default: // There is a min size of 2
-			c = item.setBytes(reader.get2u());
+			c = item.setBytes2(reader.get2u());
 			mask = 0x8000;
 			break;
 		}
@@ -661,8 +661,8 @@
 			}
 			if ((peek & 3) == 2)
 			{
-				partlength = 0xff & (int) reader.get();
-				item.setBytes((byte) partlength);
+				partlength = reader.get1u();
+				item.setBytes1(partlength);
 				partlength <<= 8;
 				partlength += peek;
 				partlength >>= 2;
@@ -669,8 +669,8 @@
 			}
 			if ((peek & 7) == 4)
 			{
-				partlength = 0xffff & (int)reader.get2u();
-				item.setBytes((char) partlength);
+				partlength = reader.get2u();
+				item.setBytes2(partlength);
 				partlength <<= 8;
 				partlength += peek;
 				partlength >>= 3;
@@ -1203,7 +1203,7 @@
 		int off;
 
 		if (getSection(15).getLen() > 0xffffff)
-			off = item.setBytes(reader.get4());
+			off = item.setBytes4(reader.get4());
 		else
 			off = item.setBytes3(reader.get3u());
 		String str = getTextString(off);
Index: src/test/display/MpsDisplay.java
===================================================================
--- src/test/display/MpsDisplay.java	(revision 537)
+++ src/test/display/MpsDisplay.java	(working copy)
@@ -38,9 +38,9 @@
 		d.setTitle("Section");
 
 		DisplayItem item = d.item();
-		byte type = reader.get();
+		int type = reader.get1u();
 
-		item.setBytes(type);
+		item.setBytes1(type);
 
 		int len;
 		switch (type) {
Index: src/test/display/NetDisplay.java
===================================================================
--- src/test/display/NetDisplay.java	(revision 537)
+++ src/test/display/NetDisplay.java	(working copy)
@@ -172,7 +172,7 @@
 			int labNum = 0;
 			do {
 				item = d.item();
-				labval = reader.get3s();
+				labval = reader.get3u();
 
 				item.setBytes3(labval);
 				int laboff = labval & 0x3fffff;
@@ -199,7 +199,7 @@
 			item.addText("Flags %02x %s", flags, flagDesc);
 
 			item = d.item();
-			int rlen = reader.get3s();
+			int rlen = reader.get3u();
 			item.setBytes3(rlen);
 
 			// this is possibly different on different maps, working with this
@@ -213,7 +213,7 @@
 				DisplayItem bitem = d.byteItem();
 
 				DisplayItem afitem = d.item();
-				int addrFlags = afitem.setBytes(reader.get());
+				int addrFlags = afitem.setBytes1(reader.get1u());
 				int nblocks = (bitem.getValue() & 0xff) + ((addrFlags & 0x3) << 8);
 				bitem.addText("Number of blocks %d", nblocks);
 
@@ -327,8 +327,8 @@
 		boolean last = false;
 		while (!last) {
 			item = d.item();
-			byte b = reader.get();
-			item.setBytes(b);
+			int b = reader.get1u();
+			item.setBytes1(b);
 			if ((b & 0x80) == 0x80) {
 				last = true;
 			}
@@ -346,7 +346,9 @@
 			int n = counts[i];
 			while (n-- > 0) {
 				item = d.item();
-				int val = item.setBytes(reader.get());
+//				int val = item.setBytes1(reader.get1u());
+// %%% to reproduce existing output, do as signed
+				int val = item.setBytes1(reader.get1s());
 
 				Formatter fmt = new Formatter();// There are a variable number of bytes that follow.  The last
 				fmt.format("Level %d: line %d", i, val);
@@ -1038,12 +1040,12 @@
 		}
 
 		private int getInitFlag() {
-			int initFlag = reader.get() & 0xff;
+			int initFlag = reader.get1u();
 			int skip = (initFlag & 0x1f);
 			initFlag >>= 5;
 			if (initFlag == 7) {
 				// Need to read another byte
-				initFlag = reader.get() & 0xff;
+				initFlag = reader.get1u();
 				skip |= ((initFlag & 0x1f) << 5);
 				initFlag >>= 5;
 			}
@@ -1059,7 +1061,7 @@
 			}
 			int cnum;
 			if (size == 1)
-				cnum = reader.get() & 0xff;
+				cnum = reader.get1u();
 			else if (size == 2)
 				cnum = reader.get2u();
 			else {
Index: src/test/display/NodDisplay.java
===================================================================
--- src/test/display/NodDisplay.java	(revision 537)
+++ src/test/display/NodDisplay.java	(working copy)
@@ -112,10 +112,10 @@
 				// 128 in which case the offset needs to be 16 bits so
 				// we need to actually read the size to find out
 				reader.position(end + 7);
-				int tabASize = reader.get() & 0xff;
-				int tabBSize = reader.get() & 0xff;
+				int tabASize = reader.get1u();
+				int tabBSize = reader.get1u();
 				reader.position(end + 9 + tabASize * 5 + tabBSize * 3);
-				if((reader.get() & 0xff) >= 0x80)
+				if((reader.get1u()) >= 0x80)
 					tabCOffsetSize = 2;
 				else
 					tabCOffsetSize = 1;
@@ -241,25 +241,21 @@
 		DisplayItem item;
 		if (bigoff) {
 			item = d.item();
-			short longoff = (short) reader.get2u();
-			item.setBytes((char) longoff);
+			int longoff = reader.get2s();
+			item.setBytes2(longoff);
 			item.addText("longitude %.5f %+d", Utils.toDegrees(longoff + currentTableHeader.getLon()), longoff);
 
 			item = d.item();
-			short latoff = (short) reader.get2u();
-			item.setBytes((char) latoff);
+			int latoff = reader.get2s();
+			item.setBytes2(latoff);
 			item.addText("latitude %.5f %+d", Utils.toDegrees(latoff + currentTableHeader.getLat()), latoff);
 
 		} else {
 			item = d.item();
-			int latlon = reader.get3s();
+			int latlon = reader.get3u();
 
-			short latoff = (short) (latlon >> 12);
-			if ((latoff & 0x800) != 0)
-				latoff |= 0xf000;
-			short longoff = (short) (latlon & 0xfff);
-			if ((longoff & 0x800) != 0)
-				longoff |= 0xf000;
+			int latoff = (latlon << 8) >> 20;  // sign extend middle bits
+			int longoff = (latlon << 20) >> 20; // sign extend bottom 12 bits
 
 			item.setBytes3(latlon);
 			item.addText("longitude %.5f %+d", Utils.toDegrees(longoff + currentTableHeader.getLon()), longoff);
@@ -301,7 +297,7 @@
 			// Continue with two byte values.  The first one has the top
 			// bit set if this is the last pointer in the node record.
 			DisplayItem item = d.item();
-			int intro1 = item.setBytes(reader.get());
+			int intro1 = item.setBytes1(reader.get1u());
 
 			// Note that this is the last if it is.
 			if ((intro1 & 0x80) == 0x80) {
@@ -314,7 +310,7 @@
 			if (longlink) {
 				int idx = intro1 & 0x3f;
 				if (idx == 0x3f) {
-					idx = item.setBytes(reader.get()) & 0xff;
+					idx = item.setBytes1(reader.get1u());
 				}
                 int linkoff = tableHeader.getLink(idx);
                 if (linkoff >= 0)
@@ -323,7 +319,7 @@
                     item.addText("error: inter-section link, index %d -> BAD INDEX", idx);
             } else {
 				// in-section relative node pointer
-				int intro2 = item.setBytes(reader.get()) & 0xff;
+				int intro2 = item.setBytes1(reader.get1u());
 				short nodeoff = (short) ((intro1 << 8 | intro2) & 0x3fff);
 
 				// Construct a pointer to another node, signed 16 bit quantity
@@ -360,11 +356,11 @@
 				if ((len1 & 0x80) == 0x80) {
 					if ((len1 & 0x40) == 0x40) {
 						item.addText("22 bit length + curve");
-						int len2 = item.setBytes(reader.get2u());
+						int len2 = item.setBytes2(reader.get2u());
 						len = (len1 & 0x3f) | (len2 << 6); // 6+16 bits
 						curve = true;
 					} else {
-						int len2 = item.setBytes(reader.get()) & 0xff;
+						int len2 = item.setBytes1(reader.get1u());
 						item.addText("14 bit length %02x %02x", len1 & 0x3f, len2);
 						len = (len1 & 0x3f) | (len2 << 6); // 6+8 bits
 						curve = false;
@@ -371,7 +367,7 @@
 					}
 				} else {
 					item.addText("15 bit length + curve");
-					int len2 = item.setBytes(reader.get()) & 0xff;
+					int len2 = item.setBytes1(reader.get1u());
 					len = (len1 & 0x7f) | (len2 << 7); // 7+8 bits
 					curve = true;
 				}
@@ -384,7 +380,7 @@
 					d.item().addText("10 bit length");
 				len = (alt6 & ARC_LEN) << 5;
 				item = d.item();
-				len |= item.setBytes(reader.get()) & 0xff; // 2+8 bits
+				len |= item.setBytes1(reader.get1u()); // 2+8 bits
 			}
 			item.addText("length %d (%dm)", len, rawToMeters(len));
 
@@ -401,9 +397,9 @@
 
 			if (curve) {
 				item = d.item();
-				int curvea = item.setBytes(reader.get()) & 0xff;
+				int curvea = item.setBytes1(reader.get1u());
 				if ((curvea & 0xe0) == 0) {
-					int curveb = item.setBytes(reader.get()) & 0xff;
+					int curveb = item.setBytes1(reader.get1u());
 					item.addText("curve[0] %02x curve[1] %02x (two bytes)", curvea, curveb);
 				} else {
 					int angle = 360 * (byte)(((curvea & 0x1f) << 3) |
@@ -461,7 +457,7 @@
 		long savpos = reader.position();
 
 		reader.position(nodeStart + nodesStart);
-		int low = reader.get() & 0xff;
+		int low = reader.get1u();
 		long tabpos = calcTablePosition(nodeStart + nodesStart, low);
 		if (tabpos != tablePosition) {
 			item.addText("error INVALID node, low=%x, tabpos=%x, max=%x", low, tabpos, tablePosition);
@@ -492,7 +488,7 @@
 			d.item().addText("net pointer index %d %02x", i, i);
 
 			DisplayItem item = d.item();
-			int off = item.setBytes3(reader.get3s());
+			int off = item.setBytes3(reader.get3u());
 			// top 2 bits of net pointer are access bits
 			int access = (off & 0xc00000) >> 8;
 			off &= 0x3fffff;
@@ -501,10 +497,10 @@
 
 			item = d.item();
 
-			int paramA = item.setBytes(reader.get());
+			int paramA = item.setBytes1(reader.get1u());
 			int paramB = 0;
 			if (tableARecordLen >= 5)
-				paramB = item.setBytes(reader.get());
+				paramB = item.setBytes1(reader.get1u());
 			String par = "class %d, speed %d";
 			if ((paramA & TOLL) == TOLL)
 				par += ", toll";
@@ -755,7 +751,7 @@
 
 			// agree with speed & class in RouteParam (plus one bit)
 			DisplayItem item = d.item();
-			int flags = item.setBytes(reader.get());
+			int flags = item.setBytes1(reader.get1u());
 			item.addText("Road classification speed=%d, class=%d",
 						 (flags & 0xf) >> 1, (flags & 0x70) >> 4);
 			if((flags & 1) == 0)
Index: src/test/display/PolygonDisplayer.java
===================================================================
--- src/test/display/PolygonDisplayer.java	(revision 537)
+++ src/test/display/PolygonDisplayer.java	(working copy)
@@ -107,7 +107,7 @@
 			DisplayItem item = d.item();
 
 			int typ_id = reader.get2u();
-			item.setBytes((char) typ_id);
+			item.setBytes2(typ_id);
 			item.addText("type %x", (typ_id >> 5));
 
 			// Get the offset into the shape style section.
Index: src/test/display/RgnDisplay.java
===================================================================
--- src/test/display/RgnDisplay.java	(revision 537)
+++ src/test/display/RgnDisplay.java	(working copy)
@@ -153,7 +153,7 @@
 		int lineNo = 1;
 		while (reader.position() < pointers[count+1]) {
 			DisplayItem item = d.item();
-			int type = item.setBytes(reader.get());
+			int type = item.setBytes1(reader.get1u());
 			item.addText("%s %d", kind, lineNo++);
 			if ("Line".equals(kind)){
 				item.addText("Type 0x%x %sdirection", type & 0x3f, (type & 0x40) != 0 ? "has":"no ");
@@ -165,7 +165,7 @@
 				twoByteBitLength = true;
 			
 			item = d.item();
-			int labval = reader.get3s();
+			int labval = reader.get3u();
 			item.setBytes3(labval);
 			int off = labval & MASK_LABEL;
 			boolean extra = (labval & FLAG_EXTRA) != 0;
@@ -295,7 +295,7 @@
 		while (reader.position() < pointers[count+1]) {
 			d.item().addText("Point #%d", num++);
 			d.byteValue("Type %x");
-			int val = reader.get3s();
+			int val = reader.get3u();
 			DisplayItem item = d.item();
 			item.setBytes3(val);
 			boolean hasSubtype = false;
Index: src/test/display/SrtDisplay.java
===================================================================
--- src/test/display/SrtDisplay.java	(revision 537)
+++ src/test/display/SrtDisplay.java	(working copy)
@@ -278,8 +278,8 @@
 	private CharPosition printCharPosition(Displayer d, int reclen, int charValue) {
 		DisplayItem item = d.item();
 
-		int flags = reader.get() & 0xff;
-		item.setBytes((byte) flags);
+		int flags = reader.get1u();
+		item.setBytes1(flags);
 
 		CharPosition c = readCharPosition(item, reclen-1, charValue);
 
@@ -319,7 +319,7 @@
 
 		if (posLength == 2) {
 			int rec = reader.get2u();
-			item.setBytes((char) rec);
+			item.setBytes2(rec);
 
 			c.first = rec & 0xff;
 			c.second = (rec >> 8) & 0xf;
@@ -332,7 +332,7 @@
 			c.third = (rec >> 16) & 0xff;
 		} else if (posLength == 4) {
 			int rec = reader.get4();
-			item.setBytes(rec);
+			item.setBytes4(rec);
 
 			c.first = rec & 0xffff;
 			c.second = (rec >> 16) & 0xff;
Index: src/test/display/StackingDisplayer.java
===================================================================
--- src/test/display/StackingDisplayer.java	(revision 537)
+++ src/test/display/StackingDisplayer.java	(working copy)
@@ -60,8 +60,8 @@
 		for (long pos = start; pos < start + size; pos += itemsize) {
 			DisplayItem item = d.item();
 
-			byte type = reader.get();
-			item.setBytes(type);
+			int type = reader.get1u();
+			item.setBytes1(type);
 
 			if (type == 0) {
 				item.addText("New level %d", ++level);
Index: src/test/display/TableHeader.java
===================================================================
--- src/test/display/TableHeader.java	(revision 537)
+++ src/test/display/TableHeader.java	(working copy)
@@ -43,8 +43,8 @@
 		lon = reader.get3s();
 		lat = reader.get3s();
 
-        int na = reader.get() & 0xff;
-        int nb = reader.get() & 0xff;
+        int na = reader.get1u();
+        int nb = reader.get1u();
 
 		// Read in Table A
 	    for (int i = 0; i < na; i++) {
Index: src/test/display/TreCalc.java
===================================================================
--- src/test/display/TreCalc.java	(revision 537)
+++ src/test/display/TreCalc.java	(working copy)
@@ -57,7 +57,7 @@
 		reader.position(0x74);
 		int mapId = reader.get4();
 		item.setStartPos(reader.position());
-		item.setBytes(mapId);
+		item.setBytes4(mapId);
 		item.addText("Map ID   %08d", mapId)
 				.addText("Map ID 0x%08x", mapId);
 
Index: src/test/files/NetFile.java
===================================================================
--- src/test/files/NetFile.java	(revision 537)
+++ src/test/files/NetFile.java	(working copy)
@@ -97,7 +97,7 @@
 		}
 
 		if ((netFlags & RoadDef.NET_FLAG_ADDRINFO) != 0) {
-			char flags2 = (char)reader.get2u();
+			int flags2 = reader.get2u();
 
 			int zipFlag = (flags2 >> 10) & 0x3;
 			int cityFlag = (flags2 >> 12) & 0x3;
@@ -132,7 +132,7 @@
 		T item = null;
 		if (flag == 2) {
 			// fetch city/zip index
-			int ind = (size == 2) ? reader.get2u() : (reader.get() & 0xff);
+			int ind = (size == 2) ? reader.get2u() : reader.get1u();
 			if (ind != 0)
 				item = list.get(ind - 1);
 		} else if (flag == 3) {
@@ -139,7 +139,7 @@
 			// there is no item
 		} else if (flag == 0) {
 			// Skip over these
-			reader.get(reader.get() & 0xff);
+			reader.get(reader.get1u());
 		} else if (flag == 1) {
 			// Skip over these
 			int n = reader.get2u();
@@ -159,7 +159,7 @@
 	private void fetchNumber(ImgFileReader reader, int numberFlag) {
 		int n = 0;
 		if (numberFlag == 0) {
-			n = reader.get() & 0xff;
+			n = reader.get1u();
 		} else if (numberFlag == 1) {
 			n = reader.get2u();
 		} else if (numberFlag == 3) {
Index: src/test/files/NodFile.java
===================================================================
--- src/test/files/NodFile.java	(revision 537)
+++ src/test/files/NodFile.java	(working copy)
@@ -101,7 +101,7 @@
         int count = 0;
         while (reader.position() < nodesStart + nodesLen) {
 	        long start = reader.position();
-            int low = reader.get() & 0xff;
+            int low = reader.get1u();
             long end = calcTablePosition(start, low);
 
 	        RouteCenter table = new RouteCenter(end, tableARecordLen, ptrShift, nodesStart);
@@ -173,7 +173,7 @@
 
 		int offset = (int) reader.position() - nodesStart;
 
-		int low = reader.get() & 0xff;
+		int low = reader.get1u();
 
         int tabstart = (int) calcTablePosition(offset + nodesStart, low);
 
@@ -194,7 +194,7 @@
 			return node;
 		}
 
-		int flags = reader.get() & 0xff;
+		int flags = reader.get1u();
 	    if (low == 0 && flags == 0)
 		    return null;
         node.setFlags(flags);
@@ -241,7 +241,7 @@
             arc.setOffset(reader.position()-nodesStart);
 
             // Start with alt6 byte
-            int alt6 = reader.get() & 0xff;
+            int alt6 = reader.get1u();
 
             arc.setAlt6(alt6);
 
@@ -251,7 +251,7 @@
 
             // Continue with two byte values.  The first one has the top
             // bit set if this is the last pointer in the node record.
-            int intro1 = reader.get() & 0xff;
+            int intro1 = reader.get1u();
 
             // Note that this is the last if it is.
             if ((intro1 & 0x80) == 0x80) {
@@ -264,7 +264,7 @@
             if (longlink) {
                 int idx = intro1 & 0x3f;
                 if (idx == 0x3f) {
-                    idx = reader.get() & 0xff;
+                    idx = reader.get1u();
                 }
 
                 // A long link that must be looked up from Table B.
@@ -277,7 +277,7 @@
                     arc.setLink(link);
             } else {
                 // in-section relative node pointer
-                int intro2 = reader.get() & 0xff;
+                int intro2 = reader.get1u();
                 int nodeoff = ((intro1 << 8 | intro2) & 0x3fff) << ptrShift;
 
                 // Construct a pointer to another node, signed 16 bit quantity
@@ -290,7 +290,7 @@
             }
 
 			if (first || newnet)
-				lastNet = reader.get() & 0xff;
+				lastNet = reader.get1u();
 
 			arc.setLocalNet(lastNet);
 			RouteCenter.TableA net = center.getNet(lastNet);
@@ -304,7 +304,7 @@
             int len;
             boolean curve;
             if ((alt6 & ARC_EXTRA) == ARC_EXTRA) {
-                int len1 = reader.get() & 0xff;
+                int len1 = reader.get1u();
                 if ((len1 & 0x80) == 0x80) {
                     if ((len1 & 0x40) == 0x40) {
                         //d.item().addText("22 bit length + curve");
@@ -313,13 +313,13 @@
                         curve = true;
                     } else {
                         //d.item().addText("14 bit length");
-                        int len2 = reader.get() & 0xff;
+                        int len2 = reader.get1u();
                         len = (len1 & 0x3f) | (len2 << 6); // 6+8 bits
                         curve = false;
                     }
                 } else {
                     //d.item().addText("15 bit length + curve");
-                    int len2 = reader.get() & 0xff;
+                    int len2 = reader.get1u();
                     len = (len1 & 0x7f) | (len2 << 7); // 7+8 bits
                     curve = true;
                 }
@@ -331,7 +331,7 @@
                 //else
                 //	d.item().addText("9 bit length");
                 len = (alt6 & 0x18) << 5;
-                len |= reader.get() & 0xff; // 2+8 bits
+                len |= reader.get1u(); // 2+8 bits
             }
 
 	        // There is a new arc direction when:
@@ -351,10 +351,10 @@
 	        arc.setDirection(dirFetcher.fetchDirection(first, newnet, sign));
 
 			if (curve) {
-                int curvea = reader.get() & 0xff;
+                int curvea = reader.get1u();
 				arc.setCurveA(curvea);
 				if ((curvea & 0xe0) == 0)
-					arc.setCurveB(reader.get() & 0xff);
+					arc.setCurveB(reader.get1u());
             }
 
             node.addArc(arc);
@@ -485,11 +485,11 @@
 		if((flags & 0x80) != 0) {
 			int extraFormat = reader.get();
 			if((extraFormat & 0x01) != 0) {
-				int len = reader.get() & 0xff;
+				int len = reader.get1u();
 				reader.get(len >> 1);
 			}
 			if((extraFormat & 0x02) != 0) {
-				int len = reader.get() & 0xff;
+				int len = reader.get1u();
 				reader.get(len >> 1);
 			}
 			if ((extraFormat & 0xc0) == 0) {
@@ -500,7 +500,7 @@
 					reader.get2u();
 				}
 			} else {
-				int len = reader.get() & 0xff;
+				int len = reader.get1u();
 				reader.get(len >> 1);
 			}
 		}
Index: src/test/files/RgnFile.java
===================================================================
--- src/test/files/RgnFile.java	(revision 537)
+++ src/test/files/RgnFile.java	(working copy)
@@ -218,11 +218,11 @@
 
 		int len;
 		if ((type & 0x80) == 0)
-			len = reader.get() & 0xff;
+			len = reader.get1u();
 		else
 			len = reader.get2u();
 
-		int base = reader.get() & 0xff;
+		int base = reader.get1u();
 
 		int xbase = 2;
 		int n = base & 0xf;
Index: src/test/files/RouteCenter.java
===================================================================
--- src/test/files/RouteCenter.java	(revision 537)
+++ src/test/files/RouteCenter.java	(working copy)
@@ -95,14 +95,14 @@
      *          At the end it will be just after, ready to read the next node.
      */
     private void readTables(ImgFileReader r) {
-        int restrformat = r.get() & 0xff;
+        int restrformat = r.get1u();
 
         int lon = latLongField(r);
         int lat = latLongField(r);
         coord = new Coord(lat, lon);
 
-        int nTabA = r.get() & 0xff;
-        int nTabB = r.get() & 0xff;
+        int nTabA = r.get1u();
+        int nTabB = r.get1u();
 
         // Now do 'Table A' (segments)
         for (int i = 0; i < nTabA; i++) {
@@ -120,9 +120,9 @@
         // 'Table C' (restrictions)
         int size = 0;
         if ((restrformat & 1) != 0) {
-            size = r.get() & 0xff;
+            size = r.get1u();
         } else if ((restrformat & 2) != 0) {
-            size = r.get2u() & 0xffff;
+            size = r.get2u();
         }
 
 		tableC.setPtrSize(size > 127? 2: 1);
@@ -181,7 +181,7 @@
 			Restriction restriction = new Restriction((int) r.position() - start);
 
 			// read the type
-			int restrType = r.get() & 0xff;
+			int restrType = r.get1u();
 
 			if ((restrType & 0xf) != 5) {
 				Log.error("Unknown restriction type %x", restrType);
@@ -188,7 +188,7 @@
 				continue;
 			}
 
-			int flags = (int) r.get() & 0xff;
+			int flags = r.get1u();
 			restriction.setFlags(flags);
 			int numItems = (flags >>> 5) & 0xff;
 			boolean extra = (flags & RESTR_EXTRA) != 0;
@@ -197,7 +197,7 @@
 
 			if ((flags & MORE_EXCEPTIONS) != 0) {
 				//0x01: car; 0x02: bus; 0x04: taxi; 0x10: delivery; 0x20: bicycle; 0x40: truck
-				int vehicleExceptions = r.get() & 0xff;
+				int vehicleExceptions = r.get1u();
 				restriction.setVehicleExceptions(vehicleExceptions);
 			}
 
@@ -217,7 +217,7 @@
 
 			// The list of roads that are involved.
 			for (int i = 0; i < numItems; i++) {
-				int ri = r.get() & 0xff;
+				int ri = r.get1u();
 
 				int roadOffset = tableA.get(ri).getNetOffset();
 				restriction.addRoadOffset(roadOffset);
@@ -226,7 +226,7 @@
 			if (extra) {
 				r.get();
 
-				int b = r.get() & 0xff;
+				int b = r.get1u();
 				if (b == 0x88) {
 					//d.byteValue("??");
 					r.get();
@@ -263,7 +263,7 @@
 		TableA a = new TableA();
 
 		// Get the NET pointer.
-		int off = r.get3s();
+		int off = r.get3u();
 
 		// top 2 bits of net pointer are access bits
 		int access = off & 0xc0_00_00;
@@ -271,10 +271,10 @@
 		off &= 0x3fffff;
 		a.setNetOffset(off);
 
-		int paramA = r.get() & 0xff;
+		int paramA = r.get1u();
 		int paramB = 0;
 		if (tableARecordLen >= 5) {
-			paramB = r.get() & 0xff;
+			paramB = r.get1u();
 		}
 
 		a.setParam(paramA);
@@ -285,11 +285,7 @@
 	}
 
     private int latLongField(ImgFileReader r) {
-        int l = r.get3s();
-        if ((l & 0x800000) != 0)
-            l |= 0xff000000;
-
-        return l;
+        return r.get3s();
     }
 
     public void addNode(RouteNode node) {
