- java.lang.Object
-
- java.io.InputStream
-
- org.refcodes.io.TimeoutInputStream
-
- org.refcodes.io.TimeoutInputStream.DummyTimeoutInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.refcodes.mixin.ReadTimeoutInMsAccessor
- Enclosing class:
- TimeoutInputStream
public static class TimeoutInputStream.DummyTimeoutInputStream extends TimeoutInputStream
Dummy implementation of aTimeoutInputStream
directly delegating to the givenInputStream
to test whether theTimeoutInputStream
has any latencies compared to theTimeoutInputStream.DummyTimeoutInputStream
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.refcodes.io.TimeoutInputStream
TimeoutInputStream.DummyTimeoutInputStream
-
Nested classes/interfaces inherited from interface org.refcodes.mixin.ReadTimeoutInMsAccessor
org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsBuilder<B extends org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsBuilder<B>>, org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsMutator, org.refcodes.mixin.ReadTimeoutInMsAccessor.ReadTimeoutInMsProperty
-
-
Constructor Summary
Constructors Constructor Description DummyTimeoutInputStream(InputStream aInputStream)
Instantiates a new dummy timeout input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
boolean
equals(Object aObj)
int
hashCode()
void
mark(int aReadlimit)
boolean
markSupported()
int
read()
int
read(byte[] aB)
int
read(byte[] aB, int aOff, int aLen)
byte[]
readAllBytes()
int
readNBytes(byte[] b, int off, int len)
void
reset()
long
skip(long aArg0)
String
toString()
long
transferTo(OutputStream aOut)
-
Methods inherited from class org.refcodes.io.TimeoutInputStream
getReadTimeoutInMs, read, read, read, readNBytes
-
Methods inherited from class java.io.InputStream
nullInputStream, readNBytes
-
-
-
-
Constructor Detail
-
DummyTimeoutInputStream
public DummyTimeoutInputStream(InputStream aInputStream)
Instantiates a new dummy timeout input stream.- Parameters:
aInputStream
- the input stream
-
-
Method Detail
-
available
public int available() throws IOException
- Overrides:
available
in classTimeoutInputStream
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classTimeoutInputStream
- Throws:
IOException
-
mark
public void mark(int aReadlimit)
- Overrides:
mark
in classTimeoutInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classTimeoutInputStream
-
read
public int read() throws IOException
- Overrides:
read
in classTimeoutInputStream
- Throws:
IOException
-
read
public int read(byte[] aB, int aOff, int aLen) throws IOException
- Overrides:
read
in classTimeoutInputStream
- Throws:
IOException
-
read
public int read(byte[] aB) throws IOException
- Overrides:
read
in classTimeoutInputStream
- Throws:
IOException
-
readAllBytes
public byte[] readAllBytes() throws IOException
- Overrides:
readAllBytes
in classInputStream
- Throws:
IOException
-
readNBytes
public int readNBytes(byte[] b, int off, int len) throws IOException
- Overrides:
readNBytes
in classTimeoutInputStream
- Throws:
IOException
-
reset
public void reset() throws IOException
- Overrides:
reset
in classTimeoutInputStream
- Throws:
IOException
-
skip
public long skip(long aArg0) throws IOException
- Overrides:
skip
in classTimeoutInputStream
- Throws:
IOException
-
transferTo
public long transferTo(OutputStream aOut) throws IOException
- Overrides:
transferTo
in classInputStream
- Throws:
IOException
-
-