Package com.saperion.ws.strategy
Class InMemoryLoader
- java.lang.Object
-
- com.saperion.ws.strategy.ReadStrategy
-
- com.saperion.ws.strategy.InMemoryLoader
-
public class InMemoryLoader extends ReadStrategy
Loads the content of the specified document. This strategy loads the document content into an ByteArrayOutputStream and stores it in memory until it is retrieved bygetInputStream
.
-
-
Constructor Summary
Constructors Constructor Description InMemoryLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaWsContent
read(java.lang.String xhdoc, int element, CloseablePooledSession session, boolean currentRevision)
Reads the content of the specified document into an SaWsContent object.
-
-
-
Method Detail
-
read
public SaWsContent read(java.lang.String xhdoc, int element, CloseablePooledSession session, boolean currentRevision) throws SaWsRepositoryException, SaWsAuthenticationException
Reads the content of the specified document into an SaWsContent object.- Specified by:
read
in classReadStrategy
- Parameters:
xhdoc
- The document identifier.element
- The position of the element inside a structured document to read.session
- The closeable session containing the connection to use for reading.- Returns:
- The read content as a SaWsContent
- Throws:
SaWsRepositoryException
- if a repository error occursSaWsAuthenticationException
- if a authentication error occurs
-
-