trait LittleEndianByteWriter extends ByteWriter
A byte writer with convenience methods for writing primitive types in little endian byte encoding.
- Alphabetic
- By Inheritance
- LittleEndianByteWriter
- ByteWriter
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def writeByte(b: Int): Unit
- Definition Classes
- ByteWriter
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def stringToBytes(s: String, maxBytes: Int): (Array[Byte], Int)
Converts a given string to it's UTF-8 byte representation and truncates it at the character boundary if needed, so that it does not occupy more that the specified max bytes.
Converts a given string to it's UTF-8 byte representation and truncates it at the character boundary if needed, so that it does not occupy more that the specified max bytes.
- s
String to convert
- maxBytes
Max bytes to return
- returns
The full string byte representation and the number of bytes that fit into the max specified bytes.
- Attributes
- protected
- Definition Classes
- ByteWriter
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()
- def writeByteArray(bytes: Array[Byte]): Unit
- Definition Classes
- ByteWriter
- def writeByteArray(bytes: Array[Byte], maxLength: Int, truncate: Boolean = true): Unit
Writes a specified number of bytes from a given array and stops once the limit is reached.
Writes a specified number of bytes from a given array and stops once the limit is reached. Fails immediately if the byte array length exceeds
length
andtruncate
is false.- Definition Classes
- ByteWriter
- def writeBytes(bytes: Int*): Unit
- Definition Classes
- ByteWriter
- def writeDecimal(d: BigDecimal, precision: Int, scale: Int): Unit
- def writeFixedByteArray(bytes: Array[Byte], length: Int, truncate: Boolean, padWith: Byte): Unit
Writes bytes from the given array and either pads it to the required
length
or truncates it if the length of the array exceeds the requiredlength
.Writes bytes from the given array and either pads it to the required
length
or truncates it if the length of the array exceeds the requiredlength
. Fails immediately if the byte array length exceedslength
andtruncate
is false.- Definition Classes
- ByteWriter
- def writeFixedString(s: String, lengthBytes: Int, truncate: Boolean, padWith: Byte): Unit
Writes the UTF-8 byte representation of the given string.
Writes the UTF-8 byte representation of the given string. The string is truncated at the character boundary to fit into
lengthBytes
bytes, iftruncate
is true. Padding bytes are written to make the total number of bytes written equal tolengthBytes
. Fails immediately if the byte array length exceedslength
andtruncate
is false.- Attributes
- protected
- Definition Classes
- ByteWriter
- def writeFloat32(d: Float): Unit
- def writeFloat64(d: Double): Unit
- def writeInt16(i: Short): Unit
- def writeInt32(i: Int): Unit
- def writeInt64(i: Long): Unit
Inherited from ByteWriter
Value Members
- abstract def writeByte(b: Int): Unit
- Definition Classes
- ByteWriter
- def stringToBytes(s: String, maxBytes: Int): (Array[Byte], Int)
Converts a given string to it's UTF-8 byte representation and truncates it at the character boundary if needed, so that it does not occupy more that the specified max bytes.
Converts a given string to it's UTF-8 byte representation and truncates it at the character boundary if needed, so that it does not occupy more that the specified max bytes.
- s
String to convert
- maxBytes
Max bytes to return
- returns
The full string byte representation and the number of bytes that fit into the max specified bytes.
- Attributes
- protected
- Definition Classes
- ByteWriter
- def writeByteArray(bytes: Array[Byte]): Unit
- Definition Classes
- ByteWriter
- def writeByteArray(bytes: Array[Byte], maxLength: Int, truncate: Boolean = true): Unit
Writes a specified number of bytes from a given array and stops once the limit is reached.
Writes a specified number of bytes from a given array and stops once the limit is reached. Fails immediately if the byte array length exceeds
length
andtruncate
is false.- Definition Classes
- ByteWriter
- def writeBytes(bytes: Int*): Unit
- Definition Classes
- ByteWriter
- def writeFixedByteArray(bytes: Array[Byte], length: Int, truncate: Boolean, padWith: Byte): Unit
Writes bytes from the given array and either pads it to the required
length
or truncates it if the length of the array exceeds the requiredlength
.Writes bytes from the given array and either pads it to the required
length
or truncates it if the length of the array exceeds the requiredlength
. Fails immediately if the byte array length exceedslength
andtruncate
is false.- Definition Classes
- ByteWriter
- def writeFixedString(s: String, lengthBytes: Int, truncate: Boolean, padWith: Byte): Unit
Writes the UTF-8 byte representation of the given string.
Writes the UTF-8 byte representation of the given string. The string is truncated at the character boundary to fit into
lengthBytes
bytes, iftruncate
is true. Padding bytes are written to make the total number of bytes written equal tolengthBytes
. Fails immediately if the byte array length exceedslength
andtruncate
is false.- Attributes
- protected
- Definition Classes
- ByteWriter
Inherited from AnyRef
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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
Ungrouped
- abstract def writeByte(b: Int): Unit
- Definition Classes
- ByteWriter
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- 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()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def stringToBytes(s: String, maxBytes: Int): (Array[Byte], Int)
Converts a given string to it's UTF-8 byte representation and truncates it at the character boundary if needed, so that it does not occupy more that the specified max bytes.
Converts a given string to it's UTF-8 byte representation and truncates it at the character boundary if needed, so that it does not occupy more that the specified max bytes.
- s
String to convert
- maxBytes
Max bytes to return
- returns
The full string byte representation and the number of bytes that fit into the max specified bytes.
- Attributes
- protected
- Definition Classes
- ByteWriter
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()
- def writeByteArray(bytes: Array[Byte]): Unit
- Definition Classes
- ByteWriter
- def writeByteArray(bytes: Array[Byte], maxLength: Int, truncate: Boolean = true): Unit
Writes a specified number of bytes from a given array and stops once the limit is reached.
Writes a specified number of bytes from a given array and stops once the limit is reached. Fails immediately if the byte array length exceeds
length
andtruncate
is false.- Definition Classes
- ByteWriter
- def writeBytes(bytes: Int*): Unit
- Definition Classes
- ByteWriter
- def writeDecimal(d: BigDecimal, precision: Int, scale: Int): Unit
- def writeFixedByteArray(bytes: Array[Byte], length: Int, truncate: Boolean, padWith: Byte): Unit
Writes bytes from the given array and either pads it to the required
length
or truncates it if the length of the array exceeds the requiredlength
.Writes bytes from the given array and either pads it to the required
length
or truncates it if the length of the array exceeds the requiredlength
. Fails immediately if the byte array length exceedslength
andtruncate
is false.- Definition Classes
- ByteWriter
- def writeFixedString(s: String, lengthBytes: Int, truncate: Boolean, padWith: Byte): Unit
Writes the UTF-8 byte representation of the given string.
Writes the UTF-8 byte representation of the given string. The string is truncated at the character boundary to fit into
lengthBytes
bytes, iftruncate
is true. Padding bytes are written to make the total number of bytes written equal tolengthBytes
. Fails immediately if the byte array length exceedslength
andtruncate
is false.- Attributes
- protected
- Definition Classes
- ByteWriter
- def writeFloat32(d: Float): Unit
- def writeFloat64(d: Double): Unit
- def writeInt16(i: Short): Unit
- def writeInt32(i: Int): Unit
- def writeInt64(i: Long): Unit
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)