mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-01-20 09:17:29 +07:00
Exposed ByteBuf for ByteInput and ByteOutput as a read-only view with doc
This commit is contained in:
parent
1fcd8b7a4d
commit
fda76aad7a
@ -73,7 +73,13 @@ public class ByteInput {
|
|||||||
return this.bitInput = bitInput;
|
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;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,13 @@ public class ByteOutput {
|
|||||||
return bitOutput != null ? bitOutput : (bitOutput = new BitOutput(this));
|
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() {
|
public ByteBuf buffer() {
|
||||||
return buffer;
|
return buffer.asReadOnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int bytesRemaining() {
|
public int bytesRemaining() {
|
||||||
|
Loading…
Reference in New Issue
Block a user