private static final class MemoryStorageProvider.MemoryStorageOutputStream extends StorageOutputStream
| Modifier and Type | Field and Description |
|---|---|
(package private) ByteArrayBuffer |
bab |
| Modifier | Constructor and Description |
|---|---|
private |
MemoryStorageOutputStream() |
| Modifier and Type | Method and Description |
|---|---|
protected Storage |
toStorage0()
Has to be implemented by a concrete subclass to create a
Storage
object from the bytes that have been written to this
StorageOutputStream. |
protected void |
write0(byte[] buffer,
int offset,
int length)
Has to implemented by a concrete subclass to write bytes from the given
byte array to this
StorageOutputStream. |
final ByteArrayBuffer bab
protected void write0(byte[] buffer,
int offset,
int length)
throws java.io.IOException
StorageOutputStreamStorageOutputStream. This method gets
called by StorageOutputStream.write(int), StorageOutputStream.write(byte[]) and
StorageOutputStream.write(byte[], int, int). All the required preconditions have
already been checked by these methods, including the check if the output
stream has already been closed.write0 in class StorageOutputStreambuffer - buffer containing bytes to write.offset - start offset in the buffer.length - number of bytes to write.java.io.IOException - if an I/O error occurs.protected Storage toStorage0() throws java.io.IOException
StorageOutputStreamStorage
object from the bytes that have been written to this
StorageOutputStream. This method gets called by
StorageOutputStream.toStorage() after the preconditions have been checked. The
implementation can also be sure that this methods gets invoked only once.toStorage0 in class StorageOutputStreamStorage object as described above.java.io.IOException - if an I/O error occurs.