Interface ICustomFormat
- All Known Implementing Classes:
BedrockLevelDatFormat,NoneFormat
public interface ICustomFormat
-
Method Summary
Modifier and TypeMethodDescriptionbooleandetect(byte[] data) Detect if the data is in this custom format.
The data may have any length, checking the length is recommended.Read the custom data from the input.
The input is in the correct endianess and decompressed if needed.voidwrite(DataOutput out, byte[] data) Write the custom data to the output.
The output is in the correct endianess and compressed if needed.
It is required to write the data as it is the serialized nbt data.
-
Method Details
-
detect
boolean detect(byte[] data) Detect if the data is in this custom format.
The data may have any length, checking the length is recommended.- Parameters:
data- The data to check- Returns:
- If the data is in this custom format
-
read
Read the custom data from the input.
The input is in the correct endianess and decompressed if needed.- Parameters:
in- The input to read from- Returns:
- The new input to read the nbt data from
- Throws:
IOException- If an I/O error occurs
-
write
Write the custom data to the output.
The output is in the correct endianess and compressed if needed.
It is required to write the data as it is the serialized nbt data.- Parameters:
out- The output to write todata- The data to write- Throws:
IOException- If an I/O error occurs
-