public static long readLongLittle(ByteSequence packet) throws IOException { spaceNeeded(packet, 8); return (read(packet) << 0) + (read(packet) << 8) + (read(packet) << 16) + ((long)read(packet) << 24) + ((long)read(packet) << 32) + ((long)read(packet) << 40) + ((long)read(packet) << 48) + ((long)read(packet) << 56); }
public static long readLongBig(ByteSequence packet) throws IOException { spaceNeeded(packet, 8); return ((long)read(packet) << 56) + ((long)read(packet) << 48) + ((long)read(packet) << 40) + ((long)read(packet) << 32) + ((long)read(packet) << 24) + ((read(packet)) << 16) + ((read(packet)) << 8) + ((read(packet)) << 0); }
public static int readUnsignedByte(ByteSequence packet) throws IOException { spaceNeeded(packet, 1); return read(packet); }
public static boolean readBoolean(ByteSequence packet) throws IOException { spaceNeeded(packet, 1); return read(packet) != 0; }
public static byte readByte(ByteSequence packet) throws IOException { spaceNeeded(packet, 1); return (byte)read(packet); }
public static long readLongLittle(ByteSequence packet) throws IOException { spaceNeeded(packet, 8); return (read(packet) << 0) + (read(packet) << 8) + (read(packet) << 16) + ((long)read(packet) << 24) + ((long)read(packet) << 32) + ((long)read(packet) << 40) + ((long)read(packet) << 48) + ((long)read(packet) << 56); }
public static long readLongBig(ByteSequence packet) throws IOException { spaceNeeded(packet, 8); return ((long)read(packet) << 56) + ((long)read(packet) << 48) + ((long)read(packet) << 40) + ((long)read(packet) << 32) + ((long)read(packet) << 24) + ((read(packet)) << 16) + ((read(packet)) << 8) + ((read(packet)) << 0); }
public static byte readByte(ByteSequence packet) throws IOException { spaceNeeded(packet, 1); return (byte)read(packet); }
public static byte readByte(ByteSequence packet) throws IOException { spaceNeeded(packet, 1); return (byte)read(packet); }