Changed picklers to read/write from/to a DataInputStream/DataOutputStream.