public interface InfiniteReadWriteByteBufferInterface
Title: CASA Agent Infrastructure
Copyright: Copyright (c) 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Company: Knowledge Science Group, Department of Computer Science, University of Calgary
Modifier and Type | Method and Description |
---|---|
int |
bytesAvailableInBuffer() |
int |
getBytesExpected() |
byte[] |
peakBuffer(int size) |
void |
putBytesExpected(int n)
Updates the number that will be returned by
getBytesExpected() . |
byte[] |
readBuffer(int size)
Returns the first size elements from the buffer and removes them
from the buffer.
|
void |
writeBuffer(byte[] data)
Adds the data to the end of the buffer.
|
byte[] peakBuffer(int size)
size
- int bytesAvailableInBuffer()
byte[] readBuffer(int size)
size
- Specifies the number or elements to read from the buffer.void writeBuffer(byte[] data)
readBuffer(int)
.data
- The data to be written into the end of the buffer.int getBytesExpected()
putBytesExpected(int)
.void putBytesExpected(int n)
getBytesExpected()
.n
- The number to be returned by subsequent calls to getBytesExpected()
.