public int toMemory ( Object o , long address , int availableSize ) throws IOException { out . resetForReUse ( ) ; writeTarget . setBase ( address , availableSize ) ; out . writeObject ( o ) ; int written = out . getWritten ( ) ; return written ; }
throws FSTBufferTooSmallException in case object does not fit into given range