private Long parseInteger(InputStream is) throws IOException {

        int readChar = is.read();

        StringBuffer buff = new StringBuffer();
        do {
            if (readChar < 0) {
                throw new IOException("Unexpected EOF found");
            }
            buff.append((char) readChar);
            readChar = is.read();
        } while (readChar != 'e');

        // System.out.println("Loaded int: " + buff);
        return Long.parseLong(buff.toString());
    }