Class RenditionClosingInputStream
java.lang.Object
java.io.InputStream
com.saperion.connector.renditions.RenditionClosingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
This class links an
InputStream to a Rendition so that the rendition will be closed when
the InputStream is closed. It is meant to be used in situations where a Rendition can't be closed because
it's InputStream is handed over to another method.- Author:
- cmerkel
-
Constructor Summary
ConstructorsConstructorDescriptionRenditionClosingInputStream(InputStream delegate, Rendition rendition) Creates a new RenditionClosingInputStream. -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
RenditionClosingInputStream
Creates a new RenditionClosingInputStream.- Parameters:
delegate- the stream to closerendition- the rendition to close
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-