Class StructureSerializationServiceImpl
java.lang.Object
com.github.shynixn.structureblocklib.bukkit.v1_17_R1.StructureSerializationServiceImpl
- All Implemented Interfaces:
com.github.shynixn.structureblocklib.api.service.StructureSerializationService
public class StructureSerializationServiceImpl
extends Object
implements com.github.shynixn.structureblocklib.api.service.StructureSerializationService
Serialization service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeSerialize(InputStream inputStream)Deserializes theInputStreamto an NMS handle of StructureTemplate.voidserialize(Object structureTemplate, OutputStream outputStream)Serializes the NMS handle of StructureTemplate to anOutputStream.
-
Constructor Details
-
StructureSerializationServiceImpl
public StructureSerializationServiceImpl()
-
-
Method Details
-
deSerialize
Deserializes theInputStreamto an NMS handle of StructureTemplate. This call is blocking.- Specified by:
deSerializein interfacecom.github.shynixn.structureblocklib.api.service.StructureSerializationService- Parameters:
inputStream- Opened inputStream. Does not close the stream after processing.- Returns:
- A new NMS instance of StructureTemplate.
- Throws:
IOException
-
serialize
Serializes the NMS handle of StructureTemplate to anOutputStream. This call is blocking.- Specified by:
serializein interfacecom.github.shynixn.structureblocklib.api.service.StructureSerializationService- Parameters:
structureTemplate- NMS handle.outputStream- Opened outputStream. Does not close the stream after processing.- Throws:
IOException
-