//buffer if the raw input stream is not already buffered
if (!(_rawInputStream instanceof BufferedInputStream)) {
in = new StaticBufferedInputStream(in);
}
_counter = new CountingInputStream(in);
_in = new LittleEndianInputStream(_counter);
} else {
//read document header (skip size, we're not interested)
_in.readInt();
}