Package com.saperion.rmi
Class SaContentStream
- java.lang.Object
-
- java.io.InputStream
-
- com.saperion.rmi.SaContentStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class SaContentStream extends java.io.InputStreamInputStreamextension to stream the document content.
Wrapper for theInputStreamto extend the stream with filename extension for the backend.
Delegates most of the overwrittenInputStreammethods to the underlying stream, injected by the constructor.- Author:
- mal
-
-
Constructor Summary
Constructors Constructor Description SaContentStream(java.io.InputStream in, java.lang.String newFileName)Contructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()booleanequals(java.lang.Object obj)java.lang.StringgetFileName()inthashCode()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()longskip(long n)
-
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Returns:
- Next byte from stream
- Throws:
java.io.IOException- IO exception- See Also:
InputStream.read()
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException- IO exception- See Also:
InputStream.close()
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException- IO exception- See Also:
InputStream.reset()
-
getFileName
public java.lang.String getFileName()
- Returns:
- Content file name
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- Returns:
- the number of bytes that can be read from this input stream without blocking.
- Throws:
java.io.IOException- IO exception- See Also:
InputStream.available()
-
mark
public void mark(int readlimit)
- Overrides:
markin classjava.io.InputStream- See Also:
InputStream.mark(int)
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream- See Also:
InputStream.markSupported()
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.read(byte[], int, int)
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.read(byte[])
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException- See Also:
InputStream.skip(long)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
-