Package ru.yandex.clickhouse.response
Class FastByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- ru.yandex.clickhouse.response.FastByteArrayInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class FastByteArrayInputStream extends InputStream
Not synchronized quick version ofByteArrayInputStream
-
-
Constructor Summary
Constructors Constructor Description FastByteArrayInputStream(byte[] buf)FastByteArrayInputStream(byte[] buf, int count)Special constructor fo creating InputStream over not fully filled array
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()byte[]getBuf()intgetCount()byte[]getData()intgetPos()booleanmarkSupported()intread()intread(byte[] b, int off, int len)voidreset()longskip(long n)-
Methods inherited from class java.io.InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
FastByteArrayInputStream
public FastByteArrayInputStream(byte[] buf)
-
FastByteArrayInputStream
public FastByteArrayInputStream(byte[] buf, int count)Special constructor fo creating InputStream over not fully filled array- Parameters:
buf- byte arraycount- number of filled elements
-
-
Method Detail
-
read
public int read()
- Specified by:
readin classInputStream
-
read
public int read(byte[] b, int off, int len)- Overrides:
readin classInputStream
-
skip
public long skip(long n)
- Overrides:
skipin classInputStream
-
available
public int available()
- Overrides:
availablein classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
getPos
public int getPos()
-
getCount
public int getCount()
-
getBuf
public byte[] getBuf()
-
getData
public byte[] getData()
-
reset
public void reset()
- Overrides:
resetin classInputStream
-
-