mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-08 14:57:30 +07:00
Exposed ByteBuf for ByteInput and ByteOutput as a read-only view with doc
This commit is contained in:
@ -73,7 +73,13 @@ public class ByteInput {
|
||||
return this.bitInput = bitInput;
|
||||
}
|
||||
|
||||
ByteBuf buffer() {
|
||||
/**
|
||||
* Returns a read-only view of the underlying byte buffer. This method is
|
||||
* provided for debugging and testing purposes. <b>Do not use this in
|
||||
* production code!</b>
|
||||
*/
|
||||
public ByteBuf buffer() {
|
||||
assert buffer.isReadOnly();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,13 @@ public class ByteOutput {
|
||||
return bitOutput != null ? bitOutput : (bitOutput = new BitOutput(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a read-only view of the underlying byte buffer. This method is
|
||||
* provided for debugging and testing purposes. <b>Do not use this in
|
||||
* production code!</b>
|
||||
*/
|
||||
public ByteBuf buffer() {
|
||||
return buffer;
|
||||
return buffer.asReadOnly();
|
||||
}
|
||||
|
||||
public int bytesRemaining() {
|
||||
|
Reference in New Issue
Block a user