java.io.Closeable, java.io.Flushable, java.lang.AutoCloseablepublic class BlockedByteArrayOutputStream
extends java.io.OutputStream
| Modifier and Type | Field | Description |
|---|---|---|
private long |
pos |
The current position of the stream.
|
private BlockedByteArray |
src |
The underlying destination.
|
| Constructor | Description |
|---|---|
BlockedByteArrayOutputStream(BlockedByteArray src,
long pos) |
Creates a new stream writing data into the specified blocked byte array.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
Closes the stream.
|
(package private) long |
getPosition() |
Returns the current position.
|
(package private) void |
setPosition(long newPos) |
Sets the position.
|
void |
write(byte[] buf,
int offset,
int len) |
Writes the specified bytes into the underlying blocked byte array.
|
void |
write(int b) |
Writes the single byte into the underlying blocked byte array.
|
private BlockedByteArray src
null when closed.private long pos
public BlockedByteArrayOutputStream(BlockedByteArray src, long pos)
src - the underlying blocked byte arraypos - the initial position of streamvoid setPosition(long newPos)
newPos - the new byte positionlong getPosition()
public void write(int b)
write in class java.io.OutputStreamb - the byte to writepublic void write(byte[] buf,
int offset,
int len)
write in class java.io.OutputStreambuf - source byte arrayoffset - index of the first byte to writelen - the number of bytes to writepublic void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeableclose in class java.io.OutputStreamApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.