public class SaRMIInputStream extends InputStream
InputStream
that reads data of a document identified by it's HDOC from the archive.Modifier and Type | Field and Description |
---|---|
protected int |
bufferPointer |
protected int |
bufferSize |
protected byte[] |
byteBuffer |
protected boolean |
closed |
protected boolean |
curRevision |
protected int |
docElement |
protected String |
docHdoc |
protected com.saperion.jni.SaJNIDocHandle |
handle |
protected boolean |
started |
Constructor and Description |
---|
SaRMIInputStream(String hdoc,
boolean currentRevision,
int elementNumber,
boolean withAnnotations,
SaRMIClientCommand connector,
Object monitor)
Constructs the
SaRMIInputStream instance which represents
the input stream of the document (will be returned from the Saperion
backend). |
SaRMIInputStream(String hdoc,
boolean currentRevision,
int elementNumber,
SaRMIClientCommand connector,
boolean dummy,
Object monitor)
Constructs the
SaRMIInputStream instance which represents
the input stream of the document (will be returned from the Saperion
backend). |
SaRMIInputStream(String hdoc,
boolean currentRevision,
int elementNumber,
SaRMIClientCommand connector,
Object monitor)
Constructs the
SaRMIInputStream instance which represents
the input stream of the document (will be returned from the Saperion
backend). |
Modifier and Type | Method and Description |
---|---|
int |
available()
Deprecated.
|
void |
close()
closes the input stream of the current document.
|
int |
getDocElement()
Retrieves the document index.
|
String |
getDocHdoc()
Retrieves the hdoc.
|
String |
getFileName() |
boolean |
isCurrentRevision()
True, if the current revision should be fetched.
|
boolean |
isDummy()
If true, no content will be read from the backend.
|
boolean |
isWithAnnotations()
True, if annotations should be saved on the document.
|
boolean |
markSupported()
Tests if this input stream supports the
mark and
reset methods. |
int |
read()
Reads the next byte of the document from the archive.
|
protected com.saperion.jni.SaJNIReadBuffer |
readDocumentFirst(String docHdoc,
boolean curRevision,
int docElement,
boolean withAnnotations) |
void |
reset() |
void |
setFileName(String newFileName) |
mark, read, read, skip
protected final String docHdoc
protected final int docElement
protected byte[] byteBuffer
protected int bufferSize
protected boolean started
protected boolean closed
protected int bufferPointer
protected com.saperion.jni.SaJNIDocHandle handle
protected boolean curRevision
public SaRMIInputStream(String hdoc, boolean currentRevision, int elementNumber, SaRMIClientCommand connector, Object monitor)
SaRMIInputStream
instance which represents
the input stream of the document (will be returned from the Saperion
backend).hdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document
should be retrieved by resolving hdocelementNumber
- number of the structure-element to read fromconnector
- the rmi-client connector used to read data from the archivemonitor
- a ClassicConnector instance used to synchronize calls on the connectorpublic SaRMIInputStream(String hdoc, boolean currentRevision, int elementNumber, boolean withAnnotations, SaRMIClientCommand connector, Object monitor)
SaRMIInputStream
instance which represents
the input stream of the document (will be returned from the Saperion
backend).hdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document
should be retrieved by resolving hdocelementNumber
- number of the structure-element to read fromwithAnnotations
- if true, annotations will be saved on the document streamconnector
- the rmi-client connector used to read data from the archivemonitor
- a ClassicConnector instance used to synchronize calls on the connectorpublic SaRMIInputStream(String hdoc, boolean currentRevision, int elementNumber, SaRMIClientCommand connector, boolean dummy, Object monitor)
SaRMIInputStream
instance which represents
the input stream of the document (will be returned from the Saperion
backend).hdoc
- Document HDOCcurrentRevision
- flag indicating that the current revision of the document
should be retrieved by resolving hdocelementNumber
- number of the structure-element to read fromconnector
- the rmi-client connector used to read data from the archivedummy
- if true, no content will be read from the backend. Instead themonitor
- a ClassicConnector instance used to synchronize calls on the connectorpublic int read() throws IOException
read
in class InputStream
IOException
- ExceptionInputStream.read()
protected com.saperion.jni.SaJNIReadBuffer readDocumentFirst(String docHdoc, boolean curRevision, int docElement, boolean withAnnotations) throws SaSystemException, SaAuthenticationException, SaGetNodeException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- ExceptionInputStream.close()
public void reset() throws IOException
reset
in class InputStream
IOException
- IOExceptionInputStream.reset()
public boolean markSupported()
mark
and
reset
methods. Whether or not mark
and
reset
are supported is an invariant property of a particular
input stream instance. The markSupported
method of
InputStream
returns false
.markSupported
in class InputStream
true
if this stream instance supports the mark and
reset methods; false
otherwise.InputStream.mark(int)
,
InputStream.reset()
public String getFileName()
public void setFileName(String newFileName)
newFileName
- File name to set@Deprecated public int available() throws IOException
available
in class InputStream
IOException
- IO exceptionInputStream.available()
public String getDocHdoc()
public int getDocElement()
public boolean isCurrentRevision()
public boolean isDummy()
public boolean isWithAnnotations()
Copyright © 2020 Hyland Software Germany GmbH. All rights reserved.