class VLQByteBufferWriter extends Writer with VLQWriter
Not thread safe
- Alphabetic
- By Inheritance
- VLQByteBufferWriter
- VLQWriter
- Writer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new VLQByteBufferWriter(b: ByteArrayBuilder)
Type Members
- type CH = ByteArrayBuilder
Type of encoded data
Type of encoded data
- Definition Classes
- VLQByteBufferWriter → Writer
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def append(writer: Aux[CH]): VLQByteBufferWriter.this.type
Append result of $writer to this Writer
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def length(): Int
Length of encoded data
Length of encoded data
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newWriter(): Aux[ByteArrayBuilder]
Creates new instance of this Writer
Creates new instance of this Writer
- returns
new instance of Writer
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def put(x: Byte): VLQByteBufferWriter.this.type
Encode signed byte
Encode signed byte
- x
byte value to encode
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- def putBits(xs: Array[Boolean]): VLQByteBufferWriter.this.type
Encode an array of boolean values as a bit array
- def putBoolean(x: Boolean): VLQByteBufferWriter.this.type
Encode boolean
Encode boolean
- x
boolean value to encode
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- def putBytes(xs: Array[Byte], offset: Int, length: Int): VLQByteBufferWriter.this.type
Encode a slice of array of bytes.
Encode a slice of array of bytes.
- xs
an array to take bytes from
- offset
first byte of the slice
- length
of the slice (number of bytes)
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- def putBytes(xs: Array[Byte]): VLQByteBufferWriter.this.type
Encode an array of bytes
Encode an array of bytes
- xs
value to encode
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- def putChunk(chunk: ByteArrayBuilder): VLQByteBufferWriter.this.type
Encode chunk
Encode chunk
- chunk
to put into this Writer
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- def putInt(x: Int): VLQByteBufferWriter.this.type
Encode signed Int using VLQ with ZigZag.
Encode signed Int using VLQ with ZigZag. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putUInt. Use putUInt to encode values that are positive.
- x
signed Int
- Definition Classes
- VLQWriter → Writer
- Annotations
- @inline()
- Note
Have to be decoded only with VLQReader.getInt The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.
- See also
- def putLong(x: Long): VLQByteBufferWriter.this.type
Encode signed Long using VLQ with ZigZag.
Encode signed Long using VLQ with ZigZag. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putULong. Use putULong to encode values that are positive.
- x
prefer signed Long
- Definition Classes
- VLQWriter → Writer
- Annotations
- @inline()
- Note
Have to be decoded only with VLQReader.getLong The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.
- See also
- def putOption[T](x: Option[T])(putValue: (VLQByteBufferWriter.this.type, T) => Unit): VLQByteBufferWriter.this.type
Encode optional value
- def putShort(x: Short): VLQByteBufferWriter.this.type
Encode signed Short using ZigZag and then VLQ.
Encode signed Short using ZigZag and then VLQ. Both negative and positive values are supported, but due to ZigZag encoding positive values is done less efficiently than by putUShort. Use putUShort to encode values that are always positive.
- x
signed Short
- Definition Classes
- VLQWriter → Writer
- Annotations
- @inline()
- Note
Have to be decoded only with VLQReader.getShort The resulting varint uses ZigZag encoding, which is much more efficient at encoding negative values than pure VLQ.
- See also
- def putShortString(s: String): VLQByteBufferWriter.this.type
Encode String is shorter than 256 bytes
- def putUByte(x: Int): VLQByteBufferWriter.this.type
Encode integer as an unsigned byte asserting the range check
Encode integer as an unsigned byte asserting the range check
- x
integer value to encode
- Definition Classes
- Writer
- Exceptions thrown
AssertionError
if x is outside of the unsigned byte range
- def putUInt(x: Long): VLQByteBufferWriter.this.type
Encode unsigned Int value using VLQ.
- def putULong(x: Long): VLQByteBufferWriter.this.type
Encode signed Long value using VLQ.
Encode signed Long value using VLQ. Both negative and positive values are supported, but only positive values are encoded efficiently, negative values are taking a toll and use six bytes. Use putLong to encode negative and positive values.
- x
prefer unsigned Long (signed value will produce a significant overhead, see note above)
- Definition Classes
- VLQWriter → Writer
- Annotations
- @inline()
- Note
Don't use it for negative values, the resulting varint is always ten bytes long – it is, effectively, treated like a very large unsigned integer. If you use putLong, the resulting varint uses ZigZag encoding, which is much more efficient.
- See also
- def putUShort(x: Int): VLQByteBufferWriter.this.type
Encode unsigned Short value using VLQ.
Encode unsigned Short value using VLQ. Only positive values are supported, Use putShort to encode negative and positive values.
- x
unsigned Short in a range 0 <= x <= 0xFFFF represented as Int
- def result(): ByteArrayBuilder
Returns encoded result
Returns encoded result
- returns
encoded result
- Definition Classes
- VLQByteBufferWriter → Writer
- Annotations
- @inline()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toBytes: Array[Byte]
- Definition Classes
- VLQByteBufferWriter → VLQWriter
- Annotations
- @inline()
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated