Class BrotliCompressorInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.commons.compress.compressors.CompressorInputStream
-
- org.apache.commons.compress.compressors.brotli.BrotliCompressorInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,InputStreamStatistics
public class BrotliCompressorInputStream extends CompressorInputStream implements InputStreamStatistics
CompressorInputStream
implementation to decode Brotli encoded stream. Library relies on Google brotli- Since:
- 1.14
-
-
Constructor Summary
Constructors Constructor Description BrotliCompressorInputStream(java.io.InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
long
getCompressedCount()
Gets the amount of raw or compressed bytes read by the stream.void
mark(int readLimit)
boolean
markSupported()
int
read()
int
read(byte[] b)
int
read(byte[] buf, int off, int len)
void
reset()
long
skip(long n)
java.lang.String
toString()
-
Methods inherited from class org.apache.commons.compress.compressors.CompressorInputStream
getBytesRead, getCount, getUncompressedCount
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.compress.utils.InputStreamStatistics
getUncompressedCount
-
-
-
-
Method Detail
-
available
public int available() throws java.io.IOException
- Overrides:
available
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
getCompressedCount
public long getCompressedCount()
Description copied from interface:InputStreamStatistics
Gets the amount of raw or compressed bytes read by the stream.- Specified by:
getCompressedCount
in interfaceInputStreamStatistics
- Returns:
- the amount of raw or compressed bytes read by the stream.
- Since:
- 1.17
-
mark
public void mark(int readLimit)
- Overrides:
mark
in classjava.io.InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupported
in classjava.io.InputStream
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] buf, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException
- Overrides:
reset
in classjava.io.InputStream
- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException
- Overrides:
skip
in classjava.io.InputStream
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-