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.InputStream
public int read(byte[] buf, int offset, int len)
len
bytes.read
in class java.io.InputStream
buf
- destination bufferoffset
- offset into the destination bufferlen
- number of bytes to readpublic void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.