Reads a token, represented by its compressed length and its byte array. @return byte array @throws IOException I/O Exception
()
| 38 | * @throws IOException I/O Exception |
| 39 | */ |
| 40 | public byte[] readToken() throws IOException { |
| 41 | final int l = readNum(); |
| 42 | if(l == 0) return Token.EMPTY; |
| 43 | final byte[] tmp = new byte[l]; |
| 44 | for(int i = 0; i < l; ++i) tmp[i] = (byte) read(); |
| 45 | return tmp; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Reads a double value. |