Skip to content
Commit fb9f736a authored by Joe Onorato's avatar Joe Onorato
Browse files

ProtoOutputStream convenience methods.

- Add a set of write methods to ProtoOutputStream that figure out the type.
  The other methods are doing all the type checking anyway, so this won't be
  much slower, and it's way easier to use.  The expected java type casts
  that people would do anyway happen inside.
- Add writeObject and writeRepeatedObject methods that write a pre-encoded
  object.
- Add a constructor that takes an OutputStream, and a flush() method.  Right
  now, all the data gets flushed at the end, but given this API it would be
  possible to write smaller chunks at the object boundaries and do more
  sophisticated buffering.

Test: CTS
Change-Id: Ieb852092d3d65812c81139558151de9e3f467dc8
parent b38ac0b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment