Package de.undercouch.bson4jackson.io

Examples of de.undercouch.bson4jackson.io.StaticBufferedInputStream


      //wrap input stream into high-performance buffered input stream.
      //even wrap BufferedInputStream and ByteArrayInputStream because
      //their methods are synchronized. Our StaticBufferedInputStream
      //is not thread-safe and thus much faster.
      if (!(in instanceof UnsafeByteArrayInputStream)) {
        in = new StaticBufferedInputStream(in);
      }
      _counter = new CountingInputStream(in);
      _in = new LittleEndianInputStream(_counter);
    }
  }
View Full Code Here


      int documentLength = ByteBuffer.wrap(buf).order(ByteOrder.LITTLE_ENDIAN).getInt();
      InputStream in = new BoundedInputStream(_rawInputStream, documentLength - buf.length);
     
      //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)
View Full Code Here

TOP

Related Classes of de.undercouch.bson4jackson.io.StaticBufferedInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.