开发者

Store BitSet in App Engine

开发者 https://www.devze.com 2023-01-24 20:01 出处:网络
What is the best way to store a BitSet in App engine?They don\'t allow 开发者_如何学Cjava.util.BitSet to be a property.BitSet is Serializable.Datastore can get/put Serializable just fine.Try EnumSet

What is the best way to store a BitSet in App engine? They don't allow 开发者_如何学Cjava.util.BitSet to be a property.


BitSet is Serializable. Datastore can get/put Serializable just fine.


Try EnumSet

"A specialized Set implementation for use with enum types. All of the elements in an enum set must come from a single enum type that is specified, explicitly or implicitly, when the set is created. Enum sets are represented internally as bit vectors. This representation is extremely compact and efficient. The space and time performance of this class should be good enough to allow its use as a high-quality, typesafe alternative to traditional int-based "bit flags." Even bulk operations (such as containsAll and retainAll) should run very quickly if the specified collection is also an enum set."


java.math.BigInteger supports common bit set operations and can be serialized to a byte array.

0

精彩评论

暂无评论...
验证码 换一张
取 消