add comment about endianness

This commit is contained in:
Tammo Spalink
2009-06-28 16:00:23 +08:00
parent 9171749700
commit c25dbf88fc
2 changed files with 6 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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
*/