MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / store

Method store

src/main/java/Archive/MessageArchive.java:122–135  ·  view source on GitHub ↗
(Msg msg, int where)

Source from the content-addressed store, hash-verified

120 }
121
122 public static void store(Msg msg, int where) {
123 try {
124 ByteArrayOutputStream bout = new ByteArrayOutputStream();
125 DataOutputStream dout = new DataOutputStream( bout );
126 msg.serialize( dout );
127 dout.close();
128 byte b[]=bout.toByteArray();
129
130 RecordStore rs=RecordStore.openRecordStore((where==1)?ARCHIVE:TEMPLATES, true);
131 rs.addRecord(b, 0, b.length);
132 rs.closeRecordStore();
133 } catch (Exception e) {
134 }
135 }
136}

Callers 3

commandActionMethod · 0.95
importArchiveMethod · 0.95
menuActionMethod · 0.95

Calls 5

openRecordStoreMethod · 0.95
addRecordMethod · 0.95
closeRecordStoreMethod · 0.95
serializeMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected