This saves memory over creating a new InputStream and ByteArrayInputStream each time data is read.
Typical usage is something like the following:
InputBuffer buffer = new InputBuffer(); while (... loop condition ...) { byte[] data = ... get data ...; int dataLength = ... get data length ...; buffer.reset(data, dataLength); ... read buffer using InputStream methods ... }
@see DataInputBuffer
@see DataOutput
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |