public virtual long readLong()
{
if (pos + 7 < len)
{
// common, fast case
return (((long) buf[pos++] << 56) | ((long) buf[pos++] << 48) | ((long) buf[pos++] << 40) | ((long) buf[pos++] << 32) | ((long) buf[pos++] << 24) | ((long) buf[pos++] << 16) | ((long) buf[pos++] << 8) | (long) buf[pos++]);
}
// general case
return (((long) read() << 56) | ((long) read() << 48) | ((long) read() << 40) | ((long) read() << 32) | ((long) read() << 24) | ((long) read() << 16) | ((long) read() << 8) | (long) read());
}