MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / write

Method write

src/main/java/fieldbox/io/Raft.java:34–38  ·  view source on GitHub ↗
(Serializable s, String filename)

Source from the content-addressed store, hash-verified

32
33
34 static public void write(Serializable s, String filename) throws IOException {
35 try(ObjectOutputStream o = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(new File(filename))))) {
36 o.writeObject(s);
37 }
38 }
39
40 static public Serializable read(String filename) throws IOException, ClassNotFoundException {
41 try(ObjectInputStream o = new ObjectInputStream(new BufferedInputStream(new FileInputStream(new File(filename))))) {

Callers

nothing calls this directly

Calls 1

writeObjectMethod · 0.45

Tested by

no test coverage detected