Interface WriteableModelSource
-
- All Known Implementing Classes:
BaseFileResourceModelSource,FileResourceModelSource
public interface WriteableModelSourceA ResourceModelSource that can write formatted model data- Since:
- 9/5/17
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringgetSourceDescription()java.lang.StringgetSyntaxMimeType()booleanhasData()longreadData(java.io.OutputStream sink)read current data into the sinklongwriteData(java.io.InputStream data)Write new data in the expected format
-
-
-
Method Detail
-
getSyntaxMimeType
java.lang.String getSyntaxMimeType()
- Returns:
- the mime type of the data
-
getSourceDescription
default java.lang.String getSourceDescription()
- Returns:
- optional description of the source
-
readData
long readData(java.io.OutputStream sink) throws java.io.IOException, ResourceModelSourceExceptionread current data into the sink- Parameters:
sink-- Returns:
- bytes written
- Throws:
java.io.IOExceptionResourceModelSourceException
-
hasData
boolean hasData()
- Returns:
- true if the call to
readData(OutputStream)is expected to succeed.
-
writeData
long writeData(java.io.InputStream data) throws java.io.IOException, ResourceModelSourceExceptionWrite new data in the expected format- Parameters:
data- data- Returns:
- bytes written
- Throws:
java.io.IOException- if an IO error occursResourceModelSourceException- if the data is not valid
-
-