Yeah, already done that (after some experimenting):
static void serializeRAMDirectory( RAMDirectory dir, output ){
if( null == dir ) return
output?.withObjectOutputStream{ out ->
out.writeLong dir.sizeInBytes()
out.writeInt dir.fileMap.size()
dir.fileMap.each{ String name, RAMFile rf ->
out.writeObject name
out.writeLong rf.length
out.writeLong rf.sizeInBytes
out.writeObject rf.buffers
}
}
}
unwrapping - in the opposite direction
The goal was to send an index segment over the network. Now it's working
again!
--
View this message in context:
http://lucene.472066.n3.nabble.com/Serializing-RAMDirectory-in-4-6-0-tp4111999p4112060.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]