- 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 aTimeoutInputStreamdirectly delegating to the givenInputStreamto test whether theTimeoutInputStreamhas 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 intavailable()voidclose()booleanequals(Object aObj)inthashCode()voidmark(int aReadlimit)booleanmarkSupported()intread()intread(byte[] aB)intread(byte[] aB, int aOff, int aLen)byte[]readAllBytes()intreadNBytes(byte[] b, int off, int len)voidreset()longskip(long aArg0)StringtoString()longtransferTo(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:
availablein classTimeoutInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classTimeoutInputStream- Throws:
IOException
-
mark
public void mark(int aReadlimit)
- Overrides:
markin classTimeoutInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classTimeoutInputStream
-
read
public int read() throws IOException- Overrides:
readin classTimeoutInputStream- Throws:
IOException
-
read
public int read(byte[] aB, int aOff, int aLen) throws IOException- Overrides:
readin classTimeoutInputStream- Throws:
IOException
-
read
public int read(byte[] aB) throws IOException- Overrides:
readin classTimeoutInputStream- Throws:
IOException
-
readAllBytes
public byte[] readAllBytes() throws IOException- Overrides:
readAllBytesin classInputStream- Throws:
IOException
-
readNBytes
public int readNBytes(byte[] b, int off, int len) throws IOException- Overrides:
readNBytesin classTimeoutInputStream- Throws:
IOException
-
reset
public void reset() throws IOException- Overrides:
resetin classTimeoutInputStream- Throws:
IOException
-
skip
public long skip(long aArg0) throws IOException- Overrides:
skipin classTimeoutInputStream- Throws:
IOException
-
transferTo
public long transferTo(OutputStream aOut) throws IOException
- Overrides:
transferToin classInputStream- Throws:
IOException
-
-