Class CodedOutputStream.AbstractBufferedEncoder

java.lang.Object
com.google.protobuf.ByteOutput
com.google.protobuf.CodedOutputStream
com.google.protobuf.CodedOutputStream.AbstractBufferedEncoder
Direct Known Subclasses:
CodedOutputStream.ByteOutputEncoder, CodedOutputStream.OutputStreamEncoder
Enclosing class:
CodedOutputStream

private abstract static class CodedOutputStream.AbstractBufferedEncoder extends CodedOutputStream
Abstract base class for buffered encoders.
  • Field Details

    • buffer

      final byte[] buffer
    • limit

      final int limit
    • position

      int position
    • totalBytesWritten

      int totalBytesWritten
  • Constructor Details

    • AbstractBufferedEncoder

      AbstractBufferedEncoder(int bufferSize)
  • Method Details

    • spaceLeft

      public final int spaceLeft()
      Description copied from class: CodedOutputStream
      If writing to a flat array, return the space left in the array. Otherwise, throws UnsupportedOperationException.
      Specified by:
      spaceLeft in class CodedOutputStream
    • getTotalBytesWritten

      public final int getTotalBytesWritten()
      Description copied from class: CodedOutputStream
      Get the total number of bytes successfully written to this stream. The returned value is not guaranteed to be accurate if exceptions have been found in the middle of writing.
      Specified by:
      getTotalBytesWritten in class CodedOutputStream
    • buffer

      final void buffer(byte value)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.
    • bufferTag

      final void bufferTag(int fieldNumber, int wireType)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.
    • bufferInt32NoTag

      final void bufferInt32NoTag(int value)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.
    • bufferUInt32NoTag

      final void bufferUInt32NoTag(int value)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.
    • bufferUInt64NoTag

      final void bufferUInt64NoTag(long value)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.
    • bufferFixed32NoTag

      final void bufferFixed32NoTag(int value)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.
    • bufferFixed64NoTag

      final void bufferFixed64NoTag(long value)
      This method does not perform bounds checking on the array. Checking array bounds is the responsibility of the caller.