trait Writer extends AnyRef
- Alphabetic
- By Inheritance
- Writer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract type CH
Type of encoded data
Abstract Value Members
- abstract def length(): Int
Length of encoded data
- abstract def newWriter(): Aux[CH]
Creates new instance of this Writer
Creates new instance of this Writer
- returns
new instance of Writer
- abstract def put(x: Byte): Writer.this.type
Encode signed byte
Encode signed byte
- x
byte value to encode
- abstract def putBits(xs: Array[Boolean]): Writer.this.type
Encode an array of boolean values as a bit array
Encode an array of boolean values as a bit array
- xs
array of boolean values
- abstract def putBoolean(x: Boolean): Writer.this.type
Encode boolean
Encode boolean
- x
boolean value to encode
- abstract def putBytes(xs: Array[Byte], offset: Int, length: Int): Writer.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)
- abstract def putBytes(xs: Array[Byte]): Writer.this.type
Encode an array of bytes
Encode an array of bytes
- xs
value to encode
- abstract def putChunk(chunk: CH): Writer.this.type
Encode chunk
Encode chunk
- chunk
to put into this Writer
- abstract def putInt(x: Int): Writer.this.type
Encode signed Int.
Encode signed Int. Use putUInt to encode values that are positive.
- x
Int
- abstract def putLong(x: Long): Writer.this.type
Encode signed Long.
Encode signed Long. Use putULong to encode values that are positive.
- x
Long
- abstract def putOption[T](x: Option[T])(putValue: (Writer.this.type, T) => Unit): Writer.this.type
Encode optional value
Encode optional value
- x
optional value to encode
- putValue
procedure to encode value, if $x is nonempty
- abstract def putShort(x: Short): Writer.this.type
Encode signed Short
Encode signed Short
Use putUShort to encode values that are positive.
- x
short value to encode
- abstract def putShortString(s: String): Writer.this.type
Encode String is shorter than 256 bytes
Encode String is shorter than 256 bytes
- s
String
- abstract def putUInt(x: Long): Writer.this.type
Encode Int that are positive.
Encode Int that are positive. Use putInt to encode values that might be negative.
- x
Int
- abstract def putULong(x: Long): Writer.this.type
Encode Long that are positive.
Encode Long that are positive. Use putLong to encode values that might be negative.
- x
Long
- abstract def putUShort(x: Int): Writer.this.type
Encode Short that are positive
Encode Short that are positive
Use putShort to encode values that might be negative.
- x
Short
- abstract def result(): CH
Returns encoded result
Returns encoded result
- returns
encoded result
Concrete 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]): Writer.this.type
Append result of $writer to this Writer
Append result of $writer to this Writer
- writer
is used as source of bytes
- 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def putUByte(x: Int): Writer.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
- Exceptions thrown
AssertionError
if x is outside of the unsigned byte range
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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