Package com.microsoft.azure.kusto.data
Class UncloseableStream
- java.lang.Object
-
- java.io.InputStream
-
- com.microsoft.azure.kusto.data.UncloseableStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class UncloseableStream extends InputStream
This class exists to handle outside dependencies which close a stream when we don't want to. It takes a stream, and simply forwards the call to all of its methods, except for theclose()method - which does nothing.
-
-
Constructor Summary
Constructors Constructor Description UncloseableStream(InputStream innerStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()Explicitly does nothing, does preserving the inner stream as openInputStreamgetInnerStream()voidmark(int readlimit)booleanmarkSupported()intread()intread(@org.jetbrains.annotations.NotNull byte[] b)intread(@org.jetbrains.annotations.NotNull byte[] b, int off, int len)voidreset()longskip(long n)-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
UncloseableStream
public UncloseableStream(InputStream innerStream)
-
-
Method Detail
-
getInnerStream
public InputStream getInnerStream()
-
close
public void close()
Explicitly does nothing, does preserving the inner stream as open- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(@NotNull @org.jetbrains.annotations.NotNull byte[] b) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(@NotNull @org.jetbrains.annotations.NotNull byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classInputStream
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
-