Closeable, AutoCloseable, Comparable<PositionInputStream>public class TestInputStream extends PositionInputStream
| Constructor | Description |
|---|---|
TestInputStream(InputStream inputStream,
long positionOffset,
long triggerPosition,
IOException ioException) |
|
TestInputStream(InputStream inputStream,
long positionOffset,
long triggerPosition,
RuntimeException runtimeException) |
|
TestInputStream(InputStream inputStream,
long triggerPosition,
IOException ioException) |
|
TestInputStream(InputStream inputStream,
long triggerPosition,
RuntimeException runtimeException) |
|
TestInputStream(InputStream inputStream,
long positionOffset,
Duration duration,
IOException ioException) |
|
TestInputStream(InputStream inputStream,
long positionOffset,
Duration duration,
RuntimeException runtimeException) |
|
TestInputStream(InputStream inputStream,
Duration duration,
IOException ioException) |
|
TestInputStream(InputStream inputStream,
Duration duration,
RuntimeException runtimeException) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object obj) |
|
int |
hashCode() |
|
int |
read() |
|
int |
read(byte[] b) |
|
int |
read(byte[] b,
int off,
int len) |
|
long |
skip(long n) |
This method overrides the
InputStream.skip(long) method to extend the
contract of the method:
This method tries to skip n bytes until the end of the stream or until an
exception is thrown. |
available, close, mark, markSupported, reset, toStringreadAllBytes, readNBytes, transferToclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTo, getPosition, seekpublic TestInputStream(InputStream inputStream, Duration duration, RuntimeException runtimeException)
public TestInputStream(InputStream inputStream, Duration duration, IOException ioException)
public TestInputStream(InputStream inputStream, long triggerPosition, RuntimeException runtimeException)
public TestInputStream(InputStream inputStream, long triggerPosition, IOException ioException)
public TestInputStream(InputStream inputStream, long positionOffset, Duration duration, RuntimeException runtimeException)
public TestInputStream(InputStream inputStream, long positionOffset, Duration duration, IOException ioException)
public TestInputStream(InputStream inputStream, long positionOffset, long triggerPosition, RuntimeException runtimeException)
public TestInputStream(InputStream inputStream, long positionOffset, long triggerPosition, IOException ioException)
public int read()
throws IOException
read in class PositionInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class PositionInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class PositionInputStreamIOExceptionpublic long skip(long n)
throws IOException
DelegatingInputStreamInputStream.skip(long) method to extend the
contract of the method:
BufferedInputStream only skip a certain amount of bytes (in this
case until the end of the current buffer) with the first call. Subsequent
calls skip more bytes later on. This is fixed here.skip in class PositionInputStreamn - is the number bytes to skip.IOExceptionpublic int hashCode()
hashCode in class PositionInputStreampublic boolean equals(Object obj)
equals in class PositionInputStreamCopyright © 2017–2018 PureSol Technologies. All rights reserved.