MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / ReadFileRecord

Method ReadFileRecord

src/main/java/io/NvStorage.java:43–60  ·  view source on GitHub ↗

Opens RMS record from named store and returns it as DataInputStream

(String name, int index)

Source from the content-addressed store, hash-verified

41 * and returns it as DataInputStream
42 */
43 static public DataInputStream ReadFileRecord(String name, int index){
44 DataInputStream istream=null;
45
46 RecordStore recordStore=null;
47 try {
48
49 recordStore = RecordStore.openRecordStore(name, false);
50 byte[] b=recordStore.getRecord(index+1);
51
52 if (b.length!=0)
53 istream=new DataInputStream( new ByteArrayInputStream(b) );
54
55 } catch (Exception e) { }
56 finally {
57 try { recordStore.closeRecordStore(); } catch (Exception e) {} }
58
59 return istream;
60 }
61
62
63 private static ByteArrayOutputStream baos;

Callers 13

RecentMenuMethod · 0.95
loadFromStorageMethod · 0.95
getCachedSrvMethod · 0.95
readFromStorageMethod · 0.95
loadFromStorageMethod · 0.95
loadRecentListMethod · 0.95
TextInputMethod · 0.95
loadFromStorageMethod · 0.95
createFromStorageMethod · 0.95
loadFromStorageMethod · 0.95
readFromStorageMethod · 0.95
loadFromStorageMethod · 0.95

Calls 3

openRecordStoreMethod · 0.95
getRecordMethod · 0.95
closeRecordStoreMethod · 0.95

Tested by

no test coverage detected