public int readPacketBytes( byte[] buf, int offset, int maxLength )
			throws IOException
		{
			int b = read();
			int i;
			for( i=0; b != -1 && (byte)b != END && i < maxLength; ++i ) {
				if( (byte)b == ESC ) {
					b = read();
					if( (byte)b == ESC_END ) b = END;
					else if( (byte)b == ESC_ESC ) b = ESC;
				}
				buf[i] = (byte)b;
				b = read();
			}
			unread(b);
			return i;
		}