public class BlockedByteArrayOutputStream
extends java.io.OutputStream
| Modifier and Type | Field and Description |
|---|---|
private long |
pos
The current position of the stream.
|
private BlockedByteArray |
src
The underlying destination.
|
| Constructor and Description |
|---|
BlockedByteArrayOutputStream(BlockedByteArray src,
long pos)
Creates a new stream writing data into the specified blocked byte array.
|
| Modifier and Type | Method and 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.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.