Class FragmentedImpExInputStream
java.lang.Object
java.io.InputStream
com.hybris.datahub.core.services.impl.FragmentedImpExInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
An input stream for reading the fragmented ImpEx file content received from DataHub.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates this input stream. -
Method Summary
Methods inherited from class java.io.InputStream
mark, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
FragmentedImpExInputStream
Instantiates this input stream.- Parameters:
f- a list of ImpEx fragments to read content from. This stream will read the fragments in the same order they received in the list.
-
-
Method Details
-
read
public int read()- Specified by:
readin classInputStream
-
read
Override in order to catch custom exception and rethrow IOException. This is necessary because the default implementation swallows IOException silently which causes MediaUtil.copy() to continue to read as it expects more data to arrive.- Overrides:
readin classInputStream- Parameters:
b-off-len-- Returns:
- The amount of bytes that were read.
- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-