java.io.Closeable, java.lang.AutoCloseablefinal class AutoPositioningStream extends BinaryToRawStream
| Modifier and Type | Field | Description |
|---|---|---|
private ConnectionChild |
conChild |
ConnectionChild to get synchronizion object
|
private long |
pos |
|
private PositionedStoreStream |
positionedStream |
| Constructor | Description |
|---|---|
AutoPositioningStream(ConnectionChild conChild,
java.io.InputStream in,
java.lang.Object parent) |
Constructs AutoPositioningStream object.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
read() |
Reads a single byte from the underlying stream.
|
int |
read(byte[] b) |
Reads a number of bytes from the underlying stream and stores them in the
specified byte array.
|
int |
read(byte[] b,
int off,
int len) |
Reads a number of bytes from the underlying stream and stores them in the
specified byte array at the specified offset.
|
private void |
setPosition() |
Checks if positionedStream's position was changed since
last used, sets the position to right position if its
changed.
|
long |
skip(long n) |
Skips up to the specified number of bytes from the underlying stream.
|
getLengthprivate final ConnectionChild conChild
private long pos
private final PositionedStoreStream positionedStream
AutoPositioningStream(ConnectionChild conChild, java.io.InputStream in, java.lang.Object parent) throws java.io.IOException
conChild - ConnectionChild to get synchronization object
before accessing PositionedStoreStreamin - InputStreamparent - Parent of the stream to prevent it from being
gc.java.io.IOException - if an I/O error occurspublic int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOException - if an I/O error occurspublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOException - if an I/O error occurspublic long skip(long n)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOException - if an I/O error occurspublic int read(byte[] b)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOException - if an I/O error occursprivate void setPosition()
throws java.io.IOException
java.io.IOExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.