Class NoneFormat
java.lang.Object
net.lenni0451.imnbt.types.formats.NoneFormat
- All Implemented Interfaces:
ICustomFormat
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
NoneFormat
public NoneFormat()
-
-
Method Details
-
detect
public boolean detect(byte[] data) Description copied from interface:ICustomFormatDetect if the data is in this custom format.
The data may have any length, checking the length is recommended.- Specified by:
detectin interfaceICustomFormat- Parameters:
data- The data to check- Returns:
- If the data is in this custom format
-
read
Description copied from interface:ICustomFormatRead the custom data from the input.
The input is in the correct endianess and decompressed if needed.- Specified by:
readin interfaceICustomFormat- 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
Description copied from interface:ICustomFormatWrite 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.- Specified by:
writein interfaceICustomFormat- Parameters:
out- The output to write todata- The data to write- Throws:
IOException- If an I/O error occurs
-