Package com.ibm.fhir.persistence
Class ResourcePayload
- java.lang.Object
-
- com.ibm.fhir.persistence.ResourcePayload
-
public class ResourcePayload extends Object
Data carrier used by the Consumer to send back streaming payload result data to a caller
-
-
Constructor Summary
Constructors Constructor Description ResourcePayload(String logicalId, Instant lastUpdated, long resourceId, InputStream decompressedPayload)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instant
getLastUpdated()
String
getLogicalId()
Getter for the logicalId of this resourcelong
getResourceId()
Getter for the resourceIdlong
transferTo(OutputStream os)
Copy the contents of the payload stream into the givenOutputStream
-
-
-
Constructor Detail
-
ResourcePayload
public ResourcePayload(String logicalId, Instant lastUpdated, long resourceId, InputStream decompressedPayload)
-
-
Method Detail
-
getLogicalId
public String getLogicalId()
Getter for the logicalId of this resource- Returns:
-
getResourceId
public long getResourceId()
Getter for the resourceId- Returns:
-
transferTo
public long transferTo(OutputStream os) throws IOException
Copy the contents of the payload stream into the givenOutputStream
- Parameters:
os
- the OutputStream to transfer the bytes into- Returns:
- the number of bytes transferred into the
OutputStream
- Throws:
IOException
-
getLastUpdated
public Instant getLastUpdated()
- Returns:
- the lastUpdated
-
-