jyemin/mongo-java-driver — pull request #11 by jyemin (2014-09-17 16:42:34+00:00)
Title: Introduced BsonInput and BsonOutput interfaces

Introduced two new interfaces:

org.bson.io.BsonInput: replaces org.bson.io.InputBuffer
org.bson.io.BsonOutput: replaces most uses of org.bson.io.OutputBuffer;

Lots of files changed, but most are from automated refactorings due to the name changes.

The purpose of this change is to give us more flexibility in the future to create other implementations of these interfaces. For example, a RandomAccessFileBsonOutput, or an InputSourceBsonInput

Of particular interest to review are the current implementations of these interfaces:

org.bson.io.ByteBufferBsonInput
org.bson.io.OutputBuffer
org.bson.io.BasicOutputBuffer
com.mongodb.connection.ByteBufferBsonOutput

BsonBinaryWriter and BsonBinaryReader also have some small but significant changes to them that were forced by the API differences between the old and new APIs.

I also added comprehensive test specifications for the BsonInput and BsonOutput implementations