Package com.clickhouse.client.data.tsv
Class FastByteArrayInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.clickhouse.client.data.tsv.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 int
available()
void
close()
byte[]
getBuf()
int
getCount()
byte[]
getData()
int
getPos()
boolean
markSupported()
int
read()
int
read(byte[] b, int off, int len)
void
reset()
long
skip(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:
read
in classInputStream
-
read
public int read(byte[] b, int off, int len)
- Overrides:
read
in classInputStream
-
skip
public long skip(long n)
- Overrides:
skip
in classInputStream
-
available
public int available()
- Overrides:
available
in classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classInputStream
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
getPos
public int getPos()
-
getCount
public int getCount()
-
getBuf
public byte[] getBuf()
-
getData
public byte[] getData()
-
reset
public void reset()
- Overrides:
reset
in classInputStream
-
-