- } \r
-\r
- /**\r
- * Get next 4 bytes as an int value. This is an optimization.\r
- * @return long value\r
- * @throws IOException\r
- */\r
- int _getInt() throws IOException\r
- {\r
- assertReadable(4); \r
-\r
- int posInBuf = (int) (pointer - buf_pos);\r
- int result =\r
- (((int) (buf[posInBuf + 3] & 0xFF)) |\r
- (((int) (buf[posInBuf + 2] & 0xFF)) << 8) |\r
- (((int) (buf[posInBuf + 1] & 0xFF)) << 16) |\r
- (((int) (buf[posInBuf] & 0xFF)) << 24));\r
- pointer+=4;\r
- return result;\r
- }\r
-\r
- /**\r
- * Get next 8 bytes as a long value. This is an optimization.\r
- * @return long value\r
- * @throws IOException\r
- */\r
- long _getLong() throws IOException\r
- {\r
- assertReadable(8);\r
-\r
- int posInBuf = (int) (pointer - buf_pos);\r
- long result =\r
- (((long) (buf[posInBuf + 7] & 0xFF)) |\r
- (((long) (buf[posInBuf + 6] & 0xFF)) << 8) |\r
- (((long) (buf[posInBuf + 5] & 0xFF)) << 16) |\r
- (((long) (buf[posInBuf + 4] & 0xFF)) << 24) |\r
- (((long) (buf[posInBuf + 3] & 0xFF)) << 32) |\r
- (((long) (buf[posInBuf + 2] & 0xFF)) << 40) |\r
- (((long) (buf[posInBuf + 1] & 0xFF)) << 48) |\r
- (((long) (buf[posInBuf] & 0xFF)) << 56));\r
- pointer+=8;\r
- return result;\r
- }\r
-\r
- /**\r
- * Get next byte\r
- * @return 0..255 or -1 on end of file\r
- * @throws IOException\r
- */\r
- int _read() throws IOException\r
- {\r
- if (readableBytesInBuffer()<1) {\r
- fill();\r
- if (readableBytesInBuffer()==0) return -1;\r
- }\r
- \r
- int posInBuf = (int) (pointer - buf_pos);\r
- int result = buf[posInBuf] & 0xFF;\r
- pointer++;\r
- return result;\r
+ }
+
+ /**
+ * Get next 4 bytes as an int value. This is an optimization.
+ * @return long value
+ * @throws IOException
+ */
+ int _getInt() throws IOException
+ {
+ assertReadable(4);
+
+ int posInBuf = (int) (pointer - buf_pos);
+ int result =
+ (((int) (buf[posInBuf + 3] & 0xFF)) |
+ (((int) (buf[posInBuf + 2] & 0xFF)) << 8) |
+ (((int) (buf[posInBuf + 1] & 0xFF)) << 16) |
+ (((int) (buf[posInBuf] & 0xFF)) << 24));
+ pointer+=4;
+ return result;
+ }
+
+ /**
+ * Get next 8 bytes as a long value. This is an optimization.
+ * @return long value
+ * @throws IOException
+ */
+ long _getLong() throws IOException
+ {
+ assertReadable(8);
+
+ int posInBuf = (int) (pointer - buf_pos);
+ long result =
+ (((long) (buf[posInBuf + 7] & 0xFF)) |
+ (((long) (buf[posInBuf + 6] & 0xFF)) << 8) |
+ (((long) (buf[posInBuf + 5] & 0xFF)) << 16) |
+ (((long) (buf[posInBuf + 4] & 0xFF)) << 24) |
+ (((long) (buf[posInBuf + 3] & 0xFF)) << 32) |
+ (((long) (buf[posInBuf + 2] & 0xFF)) << 40) |
+ (((long) (buf[posInBuf + 1] & 0xFF)) << 48) |
+ (((long) (buf[posInBuf] & 0xFF)) << 56));
+ pointer+=8;
+ return result;
+ }
+
+ /**
+ * Get next byte
+ * @return 0..255 or -1 on end of file
+ * @throws IOException
+ */
+ int _read() throws IOException
+ {
+ if (readableBytesInBuffer()<1) {
+ fill();
+ if (readableBytesInBuffer()==0) return -1;
+ }
+
+ int posInBuf = (int) (pointer - buf_pos);
+ int result = buf[posInBuf] & 0xFF;
+ pointer++;
+ return result;