Adding Java docs for Serialization, and discovered some flaws with the Java API, that have been fixed

This commit is contained in:
Viktor Klang 2011-12-30 22:00:49 +01:00
parent d8b2f88ced
commit fbb7cb20a1
10 changed files with 266 additions and 57 deletions

View file

@ -17,7 +17,7 @@ import com.google.protobuf.Message
class ProtobufSerializer extends Serializer {
val ARRAY_OF_BYTE_ARRAY = Array[Class[_]](classOf[Array[Byte]])
def includeManifest: Boolean = true
def identifier = 2: Serializer.Identifier
def identifier = 2
def toBinary(obj: AnyRef): Array[Byte] = {
if (!obj.isInstanceOf[Message]) throw new IllegalArgumentException(