Package com.storedobject.core
Class FileDataProvider
java.lang.Object
com.storedobject.core.FileDataProvider
- All Implemented Interfaces:
StreamDataProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetStream
(StreamData streamData) Get an input stream for reading the data.void
writeStream
(StreamData streamData, OutputStream output) This method will be called only if getStream() returns "null".
-
Constructor Details
-
FileDataProvider
-
FileDataProvider
-
-
Method Details
-
getStream
Description copied from interface:StreamDataProvider
Get an input stream for reading the data. If a stream for reading data can not be provided, return "null" so that writeStream() will be called.- Specified by:
getStream
in interfaceStreamDataProvider
- Parameters:
streamData
- Stream data that is requesting the stream.- Returns:
- Input stream from which data can be obtained. The stream will be closed after reading the data from it.
- Throws:
Exception
- Any exception other than Data_Not_Changed will cause the transaction "rollback".
-
writeStream
Description copied from interface:StreamDataProvider
This method will be called only if getStream() returns "null".- Specified by:
writeStream
in interfaceStreamDataProvider
- Parameters:
streamData
- Stream data that is requesting the stream.output
- Output stream to which data can be written. There is no need to close the stream after writing.- Throws:
Exception
- Any exception thrown will cause the transaction "rollback".
-