| Modifier and Type | Field and Description |
|---|---|
| private final ConnectionChild | conChild
ConnectionChild to get synchronizion object |
| private long | |
| private final PositionedStoreStream |
| Access | Constructor and Description |
|---|---|
| pack-priv | AutoPositioningStream(ConnectionChild
ConnectionChild to get synchronization object
before accessing PositionedStoreStream conChild, InputStream InputStream in, Object Parent of the stream to prevent it from being
gc. parent)Constructs AutoPositioningStream object. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The next byte of data, or -1 if the end of the stream is reached.Overrides java. Reads a single byte from the underlying stream. |
| public int | Returns: The actual number of bytes read, or -1 if the end of the stream is reached.the buffer into which the data is read. b, int the start offset in array off, int b
at which the data is written.the maximum number of bytes to read. len)Overrides java. Reads a number of bytes from the underlying stream and stores them in the specified byte array at the specified offset. |
| public int | Returns: The actual number of bytes read, or -1 if the end of the stream is reached.the buffer into which the data is read. b)Overrides java. Reads a number of bytes from the underlying stream and stores them in the specified byte array. |
| private void | setPosition()
Checks if positionedStream's position was changed since last used, sets the position to right position if its changed. |
| public long | Returns: The actual number of bytes skipped.the number of bytes to be skipped. n)Overrides java. Skips up to the specified number of bytes from the underlying stream. |
| conChild | back to summary |
|---|---|
| private final ConnectionChild conChild ConnectionChild to get synchronizion object | |
| pos | back to summary |
|---|---|
| private long pos | |
| positionedStream | back to summary |
|---|---|
| private final PositionedStoreStream positionedStream | |
| AutoPositioningStream | back to summary |
|---|---|
| pack-priv AutoPositioningStream(ConnectionChild conChild, InputStream in, Object parent) throws IOException Constructs AutoPositioningStream object. This constructor must be called from block synchronized on conChild.getConnectionSynchronization.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Overrides java. Reads a single byte from the underlying stream.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Overrides java. Reads a number of bytes from the underlying stream and stores them in the specified byte array at the specified offset.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b) throws IOException Overrides java. Reads a number of bytes from the underlying stream and stores them in the specified byte array.
| |
| setPosition | back to summary |
|---|---|
| private void setPosition() throws IOException Checks if positionedStream's position was changed since last used, sets the position to right position if its changed. | |
| skip | back to summary |
|---|---|
| public long skip(long n) throws IOException Overrides java. Skips up to the specified number of bytes from the underlying stream.
| |