This project is a Java ME implementation of Google Protocol buffer. It contains a code generator and a runtime library.
Any bug reports, questions, comments and suggestions can be sent to: hansjar at gmail dot com
User Documentation NewsAugust 20, 2009Proto2javame 0.8.1 released. A small update fixing a problem with the parseFields-method in the generated source code.
August 14, 2009Protobuf-javame 0.8.0 is released. If you have generated code with a previous version, please re-generate with 0.8.0 and update the runtime library.
Added support for read and write delimited. This means messages will write the size of the proto message before sending it. Added AbstractOutputWriter, this contains a few common writeTo methods and the createByteArray method. This will reduce the code that needs to be generated. New example (FileExample in the protobuf-javame-examples project included in the protobuf-javame-0.8.0-all.zip file). This shows how to use writeTo, writeDelimitedTo, readFrom and readDelimitedFrom.
Fixed a bug where primitives were added directly to the Vector list. This would create a compilation error. They are now first created as object and then added to the Vector.
July 15, 2009A small update to the packaged zip file. This now includes a midlet example that uses Microlog to test out the Java ME protocol buffer. The zip-file is at version 0.7.1, while the other libraries are still 0.7.0.
If you need a logging library for Java ME I highly recommend Microlog. Look at the new midlet example (protobuf-javame-midlet-example.zip packaged in the protobuf-javame-0.7.1-all.zip file) to see how it can be integrated easily with protobuf-javame.
July 2, 2009Version 0.7.0 of the proto2javame and protobuf-javame implementation released.
Updated error message to list out the input when too many input arguments are sent in. Supports backward compatibility of proto-files. This means you can update the proto-file, add new fields for example, and the old implementations will still be supported. Although the new fields will of course not be available on the old implementation. protobuf-javame Removed a lot of unused code and limited the scope of classes and methods. Added UnknownTagHandler that makes it possible for users to retrieve the unknown fields. This happens if the proto-files are updated with new files. The UnknownTagHandler will be able to list the field number and general type of the new fields. Also the content of the field is returned. The structure of the project has been refactored and updated. The protobuf-javame-0.7.0-all.zip file now contains an example directory with two examples of using the protobuf-javame library.
June 16, 20090.6.0 of the proto2javame and protobuf-javame implementation released.
New proto2javame features:
Line separator is now determined from the line.separator system property. Generated source code uses new package structure in the runtime library (needs protobuf-javame version 0.6.0 or newer to work). Generated source code is more compact and should be easier to read. Generated source code now contains the time and date when it was generated. Added new integration tests to ensure that the generated files work with the standard Google Protocol Buffer implementation.
New protobuf-javame features:
Updated package and project structure.
May 27, 2009Added user documentation.
May 20, 20090.5.0 version of protobuf-javame and proto2javame is released. This is a project that makes it possible to use Google Protocol Buffers in Java ME. It comes with its own code generator (proto2javame) and runtime library (protobuf-javame). Since it is a Java ME version it is naturally more limited than the standard implementation (http://code.google.com/p/protobuf/).
It currently supports:
string int (int32) long (int64) float bytes (ByteString) bool (boolean) double
It also supports required, repeated and optional. It uses the same proto-files as the standard implementation, but the source code files must be generated with proto2javame if you plan to use it in your Java ME code.
This is only version 0.5.0, so there are several planned features that will be added in the near future. However, if you are interested in this project and would like to use it please try it out and send me an e-mail on what you like, didn't like, suggestions to new features and bug reports. Documentation and examples will be posted soon.
To use the project simply use the code generator to create java code from your .proto-file:
java -jar proto2javame.jar --java_out=src test.proto
Finally, add the protobuf-javame.jar file to your project.
Any question, comments and suggestions can be sent to: hansjar at gmail dot com