class BlockedByteArrayInputStream
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
private long |
pos
The current position of the stream.
|
private BlockedByteArray |
src
The underlying source.
|
| Constructor and Description |
|---|
BlockedByteArrayInputStream(BlockedByteArray src,
long pos)
Creates a new input stream reading from a blocked byte array.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream.
|
(package private) long |
getPosition()
Returns the current position.
|
int |
read()
Reads a single byte.
|
int |
read(byte[] buf,
int offset,
int len)
Reads up to
len bytes. |
(package private) void |
setPosition(long newPos)
Sets the position.
|
private BlockedByteArray src
null when closed.private long pos
public BlockedByteArrayInputStream(BlockedByteArray src, long pos)
src - the source blocked byte arraypos - the initial position to start reading fromvoid setPosition(long newPos)
newPos - the new byte positionlong getPosition()
public int read()
read in class java.io.InputStreampublic int read(byte[] buf,
int offset,
int len)
len bytes.read in class java.io.InputStreambuf - destination bufferoffset - offset into the destination bufferlen - number of bytes to readpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamApache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.