java.io.Closeable
, java.lang.AutoCloseable
class BlockedByteArrayInputStream
extends java.io.InputStream
Modifier and Type | Field | Description |
---|---|---|
private long |
pos |
The current position of the stream.
|
private BlockedByteArray |
src |
The underlying source.
|
Constructor | Description |
---|---|
BlockedByteArrayInputStream(BlockedByteArray src,
long pos) |
Creates a new input stream reading from a blocked byte array.
|
Modifier and Type | Method | 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.lang.AutoCloseable
close
in interface java.io.Closeable
close
in class java.io.InputStream
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.