(Serializable value)
| 318 | } |
| 319 | |
| 320 | private String serialize(Serializable value) throws IOException { |
| 321 | ByteArrayOutputStream a = new ByteArrayOutputStream(); |
| 322 | try (ObjectOutputStream oos = new ObjectOutputStream(a)) { |
| 323 | oos.writeObject(value); |
| 324 | return Base64.getEncoder().encodeToString(a.toByteArray()); |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | private Object deserialize(String value) throws IOException, ClassNotFoundException { |
| 329 | byte[] a = Base64.getDecoder().decode(value); |