public class DataSubmission extends Object
application/x-dito-data-submission
that can be produced by deployed template's submit button. This class provides methods for parsing them in the needed format. Currently, only JSON is supported.
Modifier and Type | Method and Description |
---|---|
String |
asJsonString()
Returns the application/x-dito-data-submission payload as JSON representation, if applicable
|
static DataSubmission |
fromBytes(byte[] bytes)
Creates a new instance of DataSubmission class based on raw bytes of payload of type application/x-dito-data-submission
|
static DataSubmission |
fromInputStream(InputStream inputStream)
Creates a new instance of DataSubmission class based on a submission stream containing payload of type application/x-dito-data-submission
|
public String asJsonString()
application/x-dito-data-submission
payload as JSON representation, if applicable
String
with JSON data
public static DataSubmission fromInputStream(InputStream inputStream) throws DataSubmissionException
DataSubmission
class based on a submission stream containing payload of type application/x-dito-data-submission
inputStream
- data submission stream containing payload of type application/x-dito-data-submission
DataSubmission
instance
DataSubmissionException
- on error
public static DataSubmission fromBytes(byte[] bytes) throws DataSubmissionException
DataSubmission
class based on raw bytes of payload of type application/x-dito-data-submission
bytes
- data submission bytes of payload of type application/x-dito-data-submission
DataSubmission
instance
DataSubmissionException
- on error
Copyright © 2020. All rights reserved.