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, toString
readAllBytes, readNBytes, transferTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo, getPosition, seek
public 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 PositionInputStream
IOException
public int read(byte[] b) throws IOException
read
in class PositionInputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class PositionInputStream
IOException
public long skip(long n) throws IOException
DelegatingInputStream
InputStream.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 PositionInputStream
n
- is the number bytes to skip.IOException
public int hashCode()
hashCode
in class PositionInputStream
public boolean equals(Object obj)
equals
in class PositionInputStream
Copyright © 2017–2018 PureSol Technologies. All rights reserved.