Package okio
Class InflaterSource
java.lang.Object
okio.InflaterSource
- All Implemented Interfaces:
Closeable,AutoCloseable,Source
A source that uses DEFLATE
to decompress data read from another source.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this source and releases the resources held by this source.longRemoves at least 1, and up tobyteCountbytes from this and appends them tosink.final booleanrefill()Refills the inflater with compressed data if it needs input.timeout()Returns the timeout for this source.
-
Constructor Details
-
InflaterSource
-
-
Method Details
-
read
Description copied from interface:SourceRemoves at least 1, and up tobyteCountbytes from this and appends them tosink. Returns the number of bytes read, or -1 if this source is exhausted.- Specified by:
readin interfaceSource- Throws:
IOException
-
refill
Refills the inflater with compressed data if it needs input. (And only if it needs input). Returns true if the inflater required input but the source was exhausted.- Throws:
IOException
-
timeout
Description copied from interface:SourceReturns the timeout for this source. -
close
Description copied from interface:SourceCloses this source and releases the resources held by this source. It is an error to read a closed source. It is safe to close a source more than once.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSource- Throws:
IOException
-