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:
read
in classInputStream
- Returns:
- Next byte from stream
- Throws:
IOException
- IO exception- See Also:
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
- IO exception- See Also:
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
- IO exception- See Also:
-
getFileName
- Returns:
- Content file name
-
available
- Overrides:
available
in 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:
mark
in classInputStream
- See Also:
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
- See Also:
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
- See Also:
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
- See Also:
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
- See Also:
-
equals
-
hashCode
public int hashCode()
-