com.twitter.io

Buf

object Buf

Buf wrapper-types (like Buf.ByteArray and Buf.ByteBuffer) provide Shared and Owned APIs, each of which with construction & extraction utilities.

The Owned APIs may provide direct access to a Buf's underlying implementation; and so mutating the data structure invalidates a Buf's immutability constraint. Users must take care to handle this data immutably.

The Shared variants, on the other hand, ensure that the Buf shares no state with the caller (at the cost of additional allocation).

Note: There is a Java-friendly API for this object: com.twitter.io.Bufs.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Buf
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class ByteArray extends Buf

    A buffer representing an array of bytes.

  2. class ByteBuffer extends Buf

    A buffer representing the remaining bytes in the given ByteBuffer.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object ByteArray

  7. object ByteBuffer

  8. val Empty: Buf

    An empty buffer.

  9. object Iso8859_1 extends StringCoder

    Create and deconstruct buffers encoded by the ISO Latin Alphabet No.

  10. object U32BE

    Create and deconstruct unsigned 32-bit big endian encoded buffers.

  11. object U32LE

    Create and deconstruct unsigned 32-bit little endian encoded buffers.

  12. object U64BE

    Create and deconstruct unsigned 64-bit big endian encoded buffers.

  13. object U64LE

    Create and deconstruct unsigned 64-bit little endian encoded buffers.

  14. object UsAscii extends StringCoder

    Create and deconstruct buffers encoded by the 7-bit ASCII, also known as ISO646-US or the Basic Latin block of the Unicode character set.

  15. object Utf16 extends StringCoder

    Create and deconstruct 16-bit UTF buffers.

  16. object Utf16BE extends StringCoder

    Create and deconstruct buffers encoded by the 16-bit UTF charset with big-endian byte order.

  17. object Utf16LE extends StringCoder

    Create and deconstruct buffers encoded by the 16-bit UTF charset with little-endian byte order.

  18. object Utf8 extends StringCoder

    Create and deconstruct Utf-8 encoded buffers.

  19. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def equals(x: Buf, y: Buf): Boolean

    Byte equality between two buffers.

    Byte equality between two buffers. May copy.

    Relies on Buf.ByteArray.equals.

  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def hash(buf: Buf): Int

    The 32-bit FNV-1 of Buf

  27. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. def slowHexString(buf: Buf): String

    Return a string representing the buffer contents in hexadecimal.

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def toByteBuffer(buf: Buf): java.nio.ByteBuffer

    Convert the Buf to a java.nio.ByteBuffer.

    Convert the Buf to a java.nio.ByteBuffer.

    Annotations
    @deprecated
    Deprecated

    (Since version 6.23.0) Use Buf.ByteBuffer.Owned.extract.

Inherited from AnyRef

Inherited from Any

Ungrouped