Document
s.See: Description
Class | Description |
---|---|
BsonInputStream |
BsonInputStream provides a class to read BSON documents based on the
BSON specification. |
BsonOutputStream |
A wrapper for an
OutputStream to handle writing BSON primitives. |
BufferingBsonOutputStream |
BufferingBsonOutputStream provides a class to write BSON documents
based on the BSON specification. |
EndianUtils |
Utilities to deal with integer endian differences.
|
RandomAccessOutputStream |
Provides a capability similar to the ByteArrayOutputStream but also
provides the ability to re-write portions of the stream already written and
to determine the current size (or position) of the written data.
|
SizeOfVisitor |
A visitor to determine the size of the documents it visits.
|
SizeOfVisitor.CachedSizeNode |
CachedSizeNode provides a node in a singly linked list that forms the
cache for the sizes of lists of elements.
|
StringDecoder |
StringDecoder provides a decoder for byte arrays into strings that uses a
trie data structure to cache recurring strings.
|
StringDecoder.Node |
Node provides a single node in the trie.
|
StringEncoder |
StringEncoder provides a single location for the string encoding and sizing
logic.
|
Document
s.
Two implementations of stream are provided:
BsonInputStream
/BsonOutputStream
provide the ability to read and write BSON documents directly to a stream without the need to buffer
document contents to determine the length prefix for the document. They require 2 scans over the document.
The first determines the size of the document and the second writes the document's contents.BufferingBsonOutputStream
provide the ability to write BSON documents using an intermediate re-used set of buffers for
the document's contents.Empirical testing has shown that the un-buffered BsonInputStream and BsonOutputStream perform better on most BSON documents.
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.