Class ByteStreams.FastByteArrayOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable
    Enclosing class:
    ByteStreams

    private static final class ByteStreams.FastByteArrayOutputStream
    extends java.io.ByteArrayOutputStream
    BAOS that provides limited access to its internal byte array.
    • Field Summary

      • Fields inherited from class java.io.ByteArrayOutputStream

        buf, count
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void writeTo​(byte[] b, int off)
      Writes the contents of the internal buffer to the given array starting at the given offset.
      • Methods inherited from class java.io.ByteArrayOutputStream

        close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
      • Methods inherited from class java.io.OutputStream

        flush, nullOutputStream, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FastByteArrayOutputStream

        private FastByteArrayOutputStream()
    • Method Detail

      • writeTo

        void writeTo​(byte[] b,
                     int off)
        Writes the contents of the internal buffer to the given array starting at the given offset. Assumes the array has space to hold count bytes.