Package com.saperion.rmi
Class SaContentStream
java.lang.Object
java.io.InputStream
com.saperion.rmi.SaContentStream
- All Implemented Interfaces:
Closeable,AutoCloseable
InputStream extension to stream the document content. Wrapper for the
InputStream to extend the stream with filename extension for the backend.Delegates most of the overwritten
InputStream methods to the underlying stream, injected by the constructor.- Author:
- mal
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
SaContentStream
Contructor.- Parameters:
in- Input streamnewFileName- Content file name. Note that the path will be cut off if contained when the document is stored in the archive.
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Returns:
- Next byte from stream
- Throws:
IOException- IO exception- See Also:
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- IO exception- See Also:
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException- IO exception- See Also:
-
getFileName
- Returns:
- Content file name
-
available
- Overrides:
availablein classInputStream- Returns:
- the number of bytes that can be read from this input stream without blocking.
- Throws:
IOException- IO exception- See Also:
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream- See Also:
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream- See Also:
-
read
- Overrides:
readin classInputStream- Throws:
IOException- See Also:
-
read
- Overrides:
readin classInputStream- Throws:
IOException- See Also:
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException- See Also:
-
equals
-
hashCode
public int hashCode()
-