From 5dd29339fc554bd185a10c135d274d2aeb47b2fa Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Wed, 12 Aug 2020 23:58:03 -0700 Subject: [PATCH] Implemented ByteInput#realign --- core/src/com/riiablo/io/ByteInput.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/com/riiablo/io/ByteInput.java b/core/src/com/riiablo/io/ByteInput.java index d2b73cab..8603a42e 100644 --- a/core/src/com/riiablo/io/ByteInput.java +++ b/core/src/com/riiablo/io/ByteInput.java @@ -109,6 +109,17 @@ public class ByteInput { return bitInput(); } + /** + * Aligns the bit stream associated with this byte stream (if one exists) + * with the byte boundary. + * + * @see BitInput#align() + */ + public ByteInput realign() { + if (bitInput == null) return this; + return bitInput.align(); + } + /** * Skips n bytes by discarding them. */