public class SerializationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
readObject(File file) |
static <T> T |
readObject(InputStream is)
Reads an object from the given input stream
|
static void |
saveObject(Object toSave,
File saveTo) |
static byte[] |
toByteArray(Serializable toSave)
Converts the given object to a byte array
|
static void |
writeObject(Serializable toSave,
OutputStream writeTo)
Writes the object to the output stream
THIS DOES NOT FLUSH THE STREAMMultiLayerNetwork
|
public static <T> T readObject(File file)
public static <T> T readObject(InputStream is)
is
- the input stream to read frompublic static byte[] toByteArray(Serializable toSave)
toSave
- the object to savepublic static void writeObject(Serializable toSave, OutputStream writeTo)
toSave
- the object to savewriteTo
- the output stream to write toCopyright © 2017. All rights reserved.