Solved Save a Configuration Serializable to Binary

Discussion in 'Plugin Development' started by MasterPilot, Aug 17, 2020.

Thread Status:
Not open for further replies.
  1. Well Ive been looking to save data to binary. I researched how to do this and found how I can implement Java serializable to a class to save it to binary easily that way.

    Thoe I find out that is not a reliable way and that you can use the bukkit Configuration serializable.

    Now this would work fine if I were to be saving to a yaml. Thoe seeing as I don't have to change the data I don't see a need for saving it to a yaml. But rather to binary. So the obvious way that comes to mind is to get the Hashmap, from the Configuration Serializable method. Than just save that to binary, but I would be using the Java serializable in that case.

    So to summarize what I would like to know is if it's safe to save the Hashmap using Java serializable. Or if their is a diffrent way.

    Note: I would prefer not to have to use a API, unless it's absolutely necessary.
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. All sorts of custom objects.
    With Itemstacks, booleans, strings,..
     
  4. Offline

    timtower Administrator Administrator Moderator

    Why do you want to store it binary?
    Why make something new for something that exists and works?
     
  5. Because I dont need to change it, i feel binary is a better way of storing than clumped up YAML text documents.
    For me it semes Yaml is good for configuration, so I rather not use it to store lots of data.
     
  6. Offline

    timtower Administrator Administrator Moderator

    You might want to consider database if you have lots of data.

    You can always split things
     
  7. If it is realy not worth it to save to binary, guess I can just use YAML.
     
Thread Status:
Not open for further replies.

Share This Page