Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c25dbf88 authored by Tammo Spalink's avatar Tammo Spalink
Browse files

add comment about endianness

parent 91717497
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -65,8 +65,10 @@ public class BitwiseInputStream {
    /**
     * Read some data and increment the current position.
     *
     * @param bits the amount of data to read (gte 0, lte 8)
     * The 8-bit limit on access to bitwise streams is intentional to
     * avoid endianness issues.
     *
     * @param bits the amount of data to read (gte 0, lte 8)
     * @return byte of read data (possibly partially filled, from lsb)
     */
    public int read(int bits) throws AccessException {
@@ -88,7 +90,6 @@ public class BitwiseInputStream {
     * Read data in bulk into a byte array and increment the current position.
     *
     * @param bits the amount of data to read
     *
     * @return newly allocated byte array of read data
     */
    public byte[] readByteArray(int bits) throws AccessException {
+3 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ public class BitwiseOutputStream {
    /**
     * Write some data and increment the current position.
     *
     * The 8-bit limit on access to bitwise streams is intentional to
     * avoid endianness issues.
     *
     * @param bits the amount of data to write (gte 0, lte 8)
     * @param data to write, will be masked to expose only bits param from lsb
     */