Class StructureSerializationServiceImpl
java.lang.Object
com.github.shynixn.structureblocklib.bukkit.v1_10_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 DefinedStructure.voidserialize(Object definedStructure, OutputStream outputStream) Serializes the NMS handle of DefinedStructure to anOutputStream.
-
Constructor Details
-
StructureSerializationServiceImpl
public StructureSerializationServiceImpl()
-
-
Method Details
-
deSerialize
Deserializes theInputStreamto an NMS handle of DefinedStructure. 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 DefinedStructure.
- Throws:
IOException
-
serialize
Serializes the NMS handle of DefinedStructure to anOutputStream. This call is blocking.- Specified by:
serializein interfacecom.github.shynixn.structureblocklib.api.service.StructureSerializationService- Parameters:
definedStructure- NMS handle.outputStream- Opened outputStream. Does not close the stream after processing.- Throws:
IOException
-