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.OutputStream
b
- the byte to writepublic void write(byte[] buf, int offset, int len)
write
in class java.io.OutputStream
buf
- source byte arrayoffset
- index of the first byte to writelen
- the number of bytes to writepublic void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.OutputStream
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.