Aligns the read cursor to the beginning of the next {@code byte}. If the read cursor is in the middle of a byte, moves the cursor to the start of next byte. If the cursor is already at the start of a byte, {@link #alignRead()} does nothing and returns {@code zero}. Note that {@link #alignRead()} will never make the read cursorbeyond the write cursor to make the data corrupted. If the write cursor does not end in a full {@code byte} and if the read cursoris near the write cursor, calling {@link #alignRead()} will alwaysreturn {@link #EOF} as the read cursor cannot go past the writecursor to make a full {@code byte}.
@return The number of {@code bits} skipped to traverse to the startingbit of the next {@code byte}. If the read cursor is already at the starting bit of a {@code byte}, returns {@code zero}; if the align operation cannot move the read cursor to the beginning {@code bit} of the next {@code byte} because the write cursoris not yet that far, returns {@link #EOF}.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.