public class Input
extends java.lang.Object
Constructor and Description |
---|
Input(java.lang.String requestId)
Constructs a
Input with specified requestId . |
Modifier and Type | Method and Description |
---|---|
void |
addData(byte[] data)
Appends an item at the end of the input.
|
void |
addData(int index,
byte[] data)
Inserts the specified element at the specified position in the input.
|
void |
addData(java.lang.String key,
byte[] data)
Adds a key/value pair to the input content.
|
void |
addProperty(java.lang.String key,
java.lang.String value)
Adds a property to the input.
|
ai.djl.util.PairList<java.lang.String,byte[]> |
getContent()
Returns the content of the input.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Returns the properties of the input.
|
java.lang.String |
getRequestId()
Returns the requestId of the input.
|
void |
setContent(ai.djl.util.PairList<java.lang.String,byte[]> content)
Sets the content of the input.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties of the input.
|
public Input(java.lang.String requestId)
Input
with specified requestId
.requestId
- the requestId of the inputpublic java.lang.String getRequestId()
public java.util.Map<java.lang.String,java.lang.String> getProperties()
public void setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
properties
- the properties of the inputpublic void addProperty(java.lang.String key, java.lang.String value)
key
- key with which the specified value is to be addedvalue
- value to be added with the specified keypublic ai.djl.util.PairList<java.lang.String,byte[]> getContent()
A Input
may contains multiple data.
public void setContent(ai.djl.util.PairList<java.lang.String,byte[]> content)
content
- the content of the inputpublic void addData(byte[] data)
data
- data to be addedpublic void addData(java.lang.String key, byte[] data)
key
- key with which the specified data is to be addeddata
- data to be added with the specified keypublic void addData(int index, byte[] data)
index
- the index at which the specified element is to be inserteddata
- data to be added with the specified key