public class RandomAccessReadWriteBuffer extends RandomAccessReadBuffer implements RandomAccess
chunkSize, currentBuffer, currentBufferPointer, DEFAULT_CHUNK_SIZE_4KB, pointer, size
Constructor and Description |
---|
RandomAccessReadWriteBuffer()
Default constructor.
|
RandomAccessReadWriteBuffer(int definedChunkSize)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all data of the buffer.
|
void |
write(byte[] b)
Write a buffer of data to the stream.
|
void |
write(byte[] b,
int off,
int len)
Write a buffer of data to the stream.
|
void |
write(int b)
Write a byte to the stream.
|
checkClosed, close, createBufferFromStream, createView, expandBuffer, getPosition, isClosed, isEOF, length, read, read, resetBuffers, seek
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
available, createView, getPosition, isClosed, isEOF, length, peek, read, read, read, rewind, seek, skip
public RandomAccessReadWriteBuffer()
public RandomAccessReadWriteBuffer(int definedChunkSize)
public void clear() throws IOException
clear
in interface RandomAccessWrite
IOException
- If there is an error while clearing the data.public void write(int b) throws IOException
write
in interface RandomAccessWrite
b
- The byte to write.IOException
- If there is an IO error while writing.public void write(byte[] b) throws IOException
write
in interface RandomAccessWrite
b
- The buffer to get the data from.IOException
- If there is an error while writing the data.public void write(byte[] b, int off, int len) throws IOException
write
in interface RandomAccessWrite
b
- The buffer to get the data from.off
- An offset into the buffer to get the data from.len
- The length of data to write.IOException
- If there is an error while writing the data.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.