public class MessageDataOutput extends MessageOutput
| Constructor and Description |
|---|
MessageDataOutput()
Create a new message data input
|
MessageDataOutput(byte[] compiled,
MergeType type)
Create a new message data input
|
MessageDataOutput(MessageOutput affiliate,
MergeType type)
Create a new message data input
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable MessageOutput |
affiliate()
Get the affiliated message input
|
byte[] |
compile()
Compile the message input
|
boolean |
contains(String key,
DataType type)
Get if the message input contains the specified key
in the specified data type
|
Set<String> |
getKeys(DataType type)
Get all the data keys for the specified data type
|
MergeType |
merge()
Get the merge type
|
void |
remove(String key,
DataType type)
Remove data from the specified type
|
<T> void |
unsafeWrite(String key,
T data,
DataType type)
Write unsafely to the message input
|
void |
write(String key,
boolean data)
Write data to the message input
|
void |
write(String key,
byte[] data)
Write data to the message input
|
void |
write(String key,
char... chars)
Write data to the message input
|
void |
write(String key,
CharSequence data)
Write data to the message input
|
void |
write(String key,
Number number)
Write data to the message input
|
void |
writeSerializable(String key,
Serializable data)
Write data to the message input
|
public MessageDataOutput()
public MessageDataOutput(MessageOutput affiliate, MergeType type)
affiliate - the owner datatype - the merge typepublic MessageDataOutput(byte[] compiled,
MergeType type)
compiled - the owner datatype - the merge typepublic void writeSerializable(String key, Serializable data)
writeSerializable in class MessageOutputkey - the data keydata - the data to writepublic void write(String key, CharSequence data)
write in class MessageOutputkey - the data keydata - the data ( character sequence ) to writepublic void write(String key, boolean data)
write in class MessageOutputkey - the data keydata - the data ( boolean ) to writepublic void write(String key, Number number)
write in class MessageOutputkey - the data keynumber - the data ( number ) to writepublic void write(String key, char... chars)
write in class MessageOutputkey - the data keychars - the data ( characters ) to writepublic void write(String key, byte[] data)
write in class MessageOutputkey - the data keydata - the data ( bytes ) to writepublic <T> void unsafeWrite(String key, T data, DataType type)
unsafeWrite in class MessageOutputT - the data typekey - the data keydata - the data to writetype - the data typepublic void remove(String key, DataType type)
remove in class MessageOutputkey - the data keytype - the data typepublic Set<String> getKeys(DataType type)
getKeys in class MessageOutputtype - the data typepublic boolean contains(String key, DataType type)
contains in class MessageOutputkey - the data keytype - the data typepublic byte[] compile()
compile in class MessageOutputpublic MergeType merge()
@Nullable public @Nullable MessageOutput affiliate()
Copyright © 2022. All rights reserved.